Goodnight should leave first floor alone if Kallen is waiting for school
#29
This commit is contained in:
34
flows.json
34
flows.json
@ -1961,7 +1961,8 @@
|
|||||||
"9bd4665845af0545",
|
"9bd4665845af0545",
|
||||||
"20b3699a56b0e901",
|
"20b3699a56b0e901",
|
||||||
"f3df71ec460b7609",
|
"f3df71ec460b7609",
|
||||||
"775777f1c01e424c"
|
"775777f1c01e424c",
|
||||||
|
"334c28e08be1db12"
|
||||||
],
|
],
|
||||||
"x": 14,
|
"x": 14,
|
||||||
"y": 239,
|
"y": 239,
|
||||||
@ -25402,7 +25403,7 @@
|
|||||||
"60ce44747cf3e507",
|
"60ce44747cf3e507",
|
||||||
"50e351d1ee6108b3",
|
"50e351d1ee6108b3",
|
||||||
"f30486c8e11db0e4",
|
"f30486c8e11db0e4",
|
||||||
"9bd4665845af0545"
|
"334c28e08be1db12"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -25455,11 +25456,7 @@
|
|||||||
"floorId": [],
|
"floorId": [],
|
||||||
"areaId": [],
|
"areaId": [],
|
||||||
"deviceId": [],
|
"deviceId": [],
|
||||||
"entityId": [
|
"entityId": [],
|
||||||
"script.goodnight_in_basement",
|
|
||||||
"script.goodnight_on_first_floor",
|
|
||||||
"script.goodnight_on_second_floor"
|
|
||||||
],
|
|
||||||
"labelId": [],
|
"labelId": [],
|
||||||
"data": "",
|
"data": "",
|
||||||
"dataType": "jsonata",
|
"dataType": "jsonata",
|
||||||
@ -25470,7 +25467,7 @@
|
|||||||
"blockInputOverrides": false,
|
"blockInputOverrides": false,
|
||||||
"domain": "script",
|
"domain": "script",
|
||||||
"service": "turn_on",
|
"service": "turn_on",
|
||||||
"x": 650,
|
"x": 850,
|
||||||
"y": 520,
|
"y": 520,
|
||||||
"wires": [
|
"wires": [
|
||||||
[]
|
[]
|
||||||
@ -26108,6 +26105,27 @@
|
|||||||
],
|
],
|
||||||
"l": false
|
"l": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "334c28e08be1db12",
|
||||||
|
"type": "function",
|
||||||
|
"z": "5c4ac37140a54ac9",
|
||||||
|
"g": "f4057835848d0904",
|
||||||
|
"name": "Choose Floors",
|
||||||
|
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst schoolToday = states['input_boolean.kallen_school_today'].state\nconst kallen = states['person.kallen_stork'].state\n\nlet scripts = ['script.goodnight_in_basement','script.goodnight_on_second_floor']\n\nif ((schoolToday === 'on' && kallen != 'home') || schoolToday === 'off') {\n scripts.push('script.goodnight_on_first_floor')\n}\n\nlet sendScripts = {\n \"payload\": {\n \"action\": scripts\n }\n}\n\nnode.send(sendScripts)\nnode.status({fill:'green',shape:'dot',text:'Scripts Sent'})",
|
||||||
|
"outputs": 1,
|
||||||
|
"timeout": 0,
|
||||||
|
"noerr": 0,
|
||||||
|
"initialize": "",
|
||||||
|
"finalize": "",
|
||||||
|
"libs": [],
|
||||||
|
"x": 640,
|
||||||
|
"y": 520,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"9bd4665845af0545"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "6a37c598ccfec0c7",
|
"id": "6a37c598ccfec0c7",
|
||||||
"type": "google-home",
|
"type": "google-home",
|
||||||
|
Reference in New Issue
Block a user