10 if (initial.has_value()) {
void write_state(bool state) override
void dump_config() override
void publish_state(bool state)
Publish a state to the front-end from the back-end.
optional< bool > get_initial_state_with_restore_mode()
Returns the initial state of the switch, after applying restore mode rules.
ESPHOME_LOG_TAG(TAG, "gree.climate")