This commit is contained in:
J. Nick Koston 2023-06-07 19:39:03 -05:00
parent ca42a12213
commit d4f0389372
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -32,8 +32,9 @@ namespace ratgdo {
void RATGDOLightOutput::write_state(light::LightState* state)
{
bool binary;
bool current_state = state == LightState::LIGHT_STATE_ON;
state->current_values_as_binary(&binary);
if (binary == state == LightState::LIGHT_STATE_ON)
if (binary == current_state)
return;
if (binary) {
ESP_LOGD(TAG, "output call lightOn");