Better handle enabled / disabled relays
This commit is contained in:
@ -140,7 +140,7 @@ impl EnergyEngine {
|
||||
// Forcefully turn off disabled relays
|
||||
for d in devices {
|
||||
for r in &d.relays {
|
||||
if !r.enabled {
|
||||
if !r.enabled || !d.enabled {
|
||||
new_relays_state.get_mut(&r.id).unwrap().on = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user