void publish_state(bool new_state)
Publish a new state to the front-end.
void dump_config() override
void add_on_state_callback(F &&callback)
Set callback for state changes.
bool state
The current reported state of the binary sensor.
ESPHOME_LOG_TAG(TAG, "switch.binary_sensor")