This commit is contained in:
J. Nick Koston 2023-06-07 19:26:42 -05:00
parent 931aceef65
commit dbf6a6b839
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}
}