Reorganize climate watchdog slightly

This commit is contained in:
2026-03-29 23:38:06 -04:00
parent c7c267629d
commit 0db67b49b2

View File

@@ -14,8 +14,6 @@ if (ac === 'on' && allowed === 'on' && schedMode === 'AC' && coolingActive === '
proceed = true proceed = true
} }
//
if (sleeping != 'on') { if (sleeping != 'on') {
node.status({fill:'red',shape:'ring',text:'Emma not sleeping, watchdog disabled'}) node.status({fill:'red',shape:'ring',text:'Emma not sleeping, watchdog disabled'})
return null return null
@@ -24,10 +22,9 @@ if (sleeping != 'on') {
return null return null
} }
const airconEntity = ['climate.emma_bedroom_aircon']
// Gather relevant attributes from the aircon entity // Gather relevant attributes from the aircon entity
const airconEntity = ['climate.emma_bedroom_aircon']
const airconState = msg.payload.state const airconState = msg.payload.state
const airconAttributes = msg.payload.attributes const airconAttributes = msg.payload.attributes
const airconEco = airconAttributes['eco_mode'] const airconEco = airconAttributes['eco_mode']