switch_::Switch * source_
void dump_config() override
void write_state(bool state) override
void add_on_state_callback(F &&callback)
Set callback for state changes.
bool state
The current reported state of the binary sensor.
void publish_state(bool state)
Publish a state to the front-end from the back-end.
void control(bool target_state)
Control this switch using a boolean state value.
ESPHOME_LOG_TAG(TAG, "copy.binary_sensor")