Initial commit
This commit is contained in:
20
time-based/old/holiday-day.js
Normal file
20
time-based/old/holiday-day.js
Normal file
@ -0,0 +1,20 @@
|
||||
var states = global.get('homeassistant.homeAssistant.states')
|
||||
var holidayMode = states['input_boolean.holiday_mode'].state
|
||||
var holidayHold = states['input_boolean.holiday_mode_hold'].state
|
||||
var currentHoliday = states['input_select.holiday_animation'].state
|
||||
var holiday = currentHoliday.toLowerCase()
|
||||
|
||||
if (holidayMode === 'on') {
|
||||
if (holidayHold === 'off') {
|
||||
node.status({fill:"green",shape:"dot",text:"Holiday On" });
|
||||
msg.holiday = holiday
|
||||
return msg;
|
||||
} else {
|
||||
node.status({fill:"yellow",shape:"dot",text:"Holiday Hold On"});
|
||||
msg.holiday = holiday
|
||||
return msg;
|
||||
}
|
||||
} else {
|
||||
node.status({fill:"red",shape:"ring",text:"Holiday Off"});
|
||||
return null;
|
||||
}
|
Reference in New Issue
Block a user