17 lines
518 B
JavaScript
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]
|
|
}
|