Files
HA-NerdFlows-Functions/climate/kallen/old/schedmode_old.js
2023-09-28 12:28:27 -04:00

17 lines
518 B
JavaScript

var states = global.get('homeassistant.homeAssistant.states')
var schedMode = states['input_select.scheduled_climate_mode_kallen_fan'].state
msg.topic = 'common'
msg.voice = 'Joanna'
if (schedMode === 'White Noise') {
node.status({fill:"green",shape:"dot",text:"White Noise"});
return[msg,null,null]
} else if (schedMode === 'Fan') {
node.status({fill:"green",shape:"dot",text:"Fan"});
return[null,msg,null]
} else {
node.status({fill:"blue",shape:"dot",text:"N/A"});
return[null,null,msg]
}