7 static const char *
const TAG =
"output.switch";
11 ESP_LOGCONFIG(TAG,
"Setting up Output Switch '%s'...", this->
name_.
c_str());
virtual void turn_on()
Enable this binary output.
output::BinaryOutput * output_
virtual void turn_off()
Disable this binary output.
void dump_config() override
optional< bool > get_initial_state_with_restore_mode()
Returns the initial state of the switch, after applying restore mode rules.
void write_state(bool state) override
void turn_on()
Turn this switch on.
constexpr const char * c_str() const
Implementation of SPI Controller mode.
void publish_state(bool state)
Publish a state to the front-end from the back-end.
bool state
The current reported state of the binary sensor.
value_type value_or(U const &v) const
void turn_off()
Turn this switch off.