cleanups
This commit is contained in:
parent
ca42a12213
commit
d4f0389372
|
@ -32,8 +32,9 @@ namespace ratgdo {
|
||||||
void RATGDOLightOutput::write_state(light::LightState* state)
|
void RATGDOLightOutput::write_state(light::LightState* state)
|
||||||
{
|
{
|
||||||
bool binary;
|
bool binary;
|
||||||
|
bool current_state = state == LightState::LIGHT_STATE_ON;
|
||||||
state->current_values_as_binary(&binary);
|
state->current_values_as_binary(&binary);
|
||||||
if (binary == state == LightState::LIGHT_STATE_ON)
|
if (binary == current_state)
|
||||||
return;
|
return;
|
||||||
if (binary) {
|
if (binary) {
|
||||||
ESP_LOGD(TAG, "output call lightOn");
|
ESP_LOGD(TAG, "output call lightOn");
|
||||||
|
|
Loading…
Reference in New Issue