tidy up
This commit is contained in:
parent
931aceef65
commit
dbf6a6b839
|
@ -16,9 +16,10 @@ namespace ratgdo {
|
|||
void RATGDOLightOutput::on_light_state(LightState state)
|
||||
{
|
||||
ESP_LOGD(TAG, "on_light_state: %d", state);
|
||||
this->_is_on = state == LightState::LIGHT_STATE_ON;
|
||||
if (this->light_state_) {
|
||||
auto call = this->light_state_->make_call();
|
||||
call.set_state(state == LightState::LIGHT_STATE_ON);
|
||||
call.set_state(this->_is_on);
|
||||
call.perform();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue