34 const bool heading_on = this->
parent_->is_light_heading_on();
35 if (binary == heading_on)
38 ESP_LOGD(TAG,
"Ignoring the restored state, the door decides what the lamp is doing");
39 }
else if (published != binary) {
41 if (this->
parent_->set_light(binary))
43 ESP_LOGW(TAG,
"Door has not reported the lamp yet, ignoring the requested state");
52 if (!this->
parent_->is_valid()) {
56 if (!this->
parent_->is_light_known()) {
62 const bool heading_on = this->
parent_->is_light_heading_on();
void status_set_warning()
void status_clear_warning()
light::LightTraits get_traits() override
light::LightState * light_state_
void write_state(light::LightState *state) override
HoermannHcp *const parent_
void publish_lamp_state_(bool on)
void update_from_state_()
optional< bool > published_state_
void setup_state(light::LightState *state) override
LightCall & set_save(bool save)
Set whether this light call should trigger a save state to recover them at startup....
LightCall & set_state(optional< bool > state)
Set the binary ON/OFF state of the light.
bool is_on() const
Get the binary true/false state of these light color values.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
LightColorValues remote_values
The remote color values reported to the frontend.
void current_values_as_binary(bool *binary)
The result of all the current_values_as_* methods have gamma correction applied.
This class is used to represent the capabilities of a light.
ESPHOME_LOG_TAG(TAG, "hoermann_hcp.binary_sensor")
@ ON_OFF
Only on/off control.