43 LOG_SWITCH(
"",
"Template Switch",
this);
44 ESP_LOGCONFIG(TAG,
" Optimistic: %s", YESNO(this->
optimistic_));
void disable_loop()
Disable this component's loop.
bool has_value() const
Check if a lambda is set.
void stop_action()
Stop any action connected to this trigger.
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Inform the parent automation that the event has triggered.
void restore()
Drive the switch to the state its restore mode yields, through control(), so inversion and write_stat...
void publish_state(bool state)
Publish a state to the front-end from the back-end.
Trigger * get_turn_off_trigger()
float get_setup_priority() const override
void write_state(bool state) override
TemplateLambda< bool > f_
bool assumed_state() override
Trigger turn_off_trigger_
Trigger * get_turn_on_trigger()
void dump_config() override
ESPHOME_LOG_TAG(TAG, "alarm_control_panel")
constexpr float HARDWARE
For components that deal with hardware and are very important like GPIO switch.