# HG changeset patch # User Michiel Broek # Date 1503071114 -7200 # Node ID 34bf9f38974900593eb3a3691eb061260826d5e0 # Parent 2e42fdf590191e34d63afec7c696feb808f21d16 Lights always on diff -r 2e42fdf59019 -r 34bf9f389749 thermferm/thermferm.c --- a/thermferm/thermferm.c Thu Aug 10 20:32:50 2017 +0200 +++ b/thermferm/thermferm.c Fri Aug 18 17:45:14 2017 +0200 @@ -1572,7 +1572,7 @@ * Interior lights */ if (unit->light_address) { - if (unit->door_state && unit->light_state) { + if (unit->door_state && (unit->mode == UNITMODE_NONE) && unit->light_state) { if (unit->light_wait > 0) { unit->light_wait--; } else { @@ -1581,7 +1581,7 @@ unit->mqtt_flag |= MQTT_FLAG_DATA; } } - if (!unit->door_state && !unit->light_state) { + if ((!unit->door_state || (unit->mode != UNITMODE_NONE)) && !unit->light_state) { unit->light_wait = unit->light_delay; /* No delay to turn lights on */ unit->light_state = 1; unit->mqtt_flag |= MQTT_FLAG_DATA;