[
{
"id": "4a8821853d4dd1ad",
"type": "tab",
"label": "Kallen Timer",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e44b1e7a8ef7ae1d",
"type": "tab",
"label": "Time-based automations",
"disabled": false,
"info": "",
"env": []
},
{
"id": "3abb5ae57afb4761",
"type": "tab",
"label": "Presence",
"disabled": false,
"info": "",
"env": []
},
{
"id": "eff21041cc941fef",
"type": "tab",
"label": "First Floor",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5e238cbbe6d612c9",
"type": "tab",
"label": "Second Floor",
"disabled": false,
"info": "",
"env": []
},
{
"id": "47f17992fab9b4f5",
"type": "tab",
"label": "Basement",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b5717a86ce55bc29",
"type": "tab",
"label": "Outdoor Lighting",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b0286fae9f2ce547",
"type": "tab",
"label": "Media Scenes",
"disabled": false,
"info": "",
"env": []
},
{
"id": "72f99805df043603",
"type": "tab",
"label": "Climate",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b7d34d3e9d0c9486",
"type": "tab",
"label": "Laundry",
"disabled": false,
"info": "",
"env": []
},
{
"id": "ce79e27ec84983a9",
"type": "tab",
"label": "Batteries",
"disabled": false,
"info": "",
"env": []
},
{
"id": "458e4c0055c8c533",
"type": "tab",
"label": "Alarm Clocks",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5c4ac37140a54ac9",
"type": "tab",
"label": "Alexa",
"disabled": false,
"info": "",
"env": []
},
{
"id": "75e98103856848a6",
"type": "tab",
"label": "Google Home",
"disabled": false,
"info": "",
"env": []
},
{
"id": "9a8e84bd2945505e",
"type": "tab",
"label": "Announcements",
"disabled": false,
"info": "",
"env": []
},
{
"id": "bb961e59e2ef86c9",
"type": "tab",
"label": "Apple",
"disabled": false,
"info": "",
"env": []
},
{
"id": "ee67610b4a0578d2",
"type": "tab",
"label": "Messaging",
"disabled": false,
"info": "",
"env": []
},
{
"id": "873eb2575d6e9014",
"type": "tab",
"label": "Gitea",
"disabled": false,
"info": "",
"env": []
},
{
"id": "ebd5561c4f077718",
"type": "tab",
"label": "Weather",
"disabled": false,
"info": "",
"env": []
},
{
"id": "fc6801ef8637d652",
"type": "tab",
"label": "Sports",
"disabled": false,
"info": "",
"env": []
},
{
"id": "789ba711dc04fad2",
"type": "tab",
"label": "Twitch",
"disabled": false,
"info": "",
"env": []
},
{
"id": "ffa6a885ac41a5ed",
"type": "tab",
"label": "Server Stuff",
"disabled": false,
"info": "",
"env": []
},
{
"id": "3e4ba157b540d183",
"type": "tab",
"label": "Global Variable Settings",
"disabled": false,
"info": "",
"env": []
},
{
"id": "d3dcbe534743b01d",
"type": "tab",
"label": "Discord",
"disabled": true,
"info": "",
"env": []
},
{
"id": "d49b385d8b582b20",
"type": "tab",
"label": "Test",
"disabled": false,
"info": "",
"env": []
},
{
"id": "a42343e035e3313c",
"type": "subflow",
"name": "Alexa Location (Serial #)",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "1102574d15bdad4c"
}
]
}
],
"out": [
{
"x": 460,
"y": 80,
"wires": [
{
"id": "afead614fabc01bb",
"port": 0
}
]
}
],
"env": [],
"meta": {
"type": "Alexa Subflow"
},
"color": "#DDAA99",
"icon": "node-red-contrib-alexa-remote2-applestrudel/alexa-remote-icon.png",
"status": {
"x": 460,
"y": 140,
"wires": [
{
"id": "afead614fabc01bb",
"port": 1
}
]
}
},
{
"id": "4107976aa434eb03",
"type": "subflow",
"name": "Weather Conversions",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 80,
"wires": [
{
"id": "388878f6056fa3e4"
}
]
}
],
"out": [
{
"x": 500,
"y": 80,
"wires": [
{
"id": "80ce4b42b82e3c78",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "font-awesome/fa-cloud"
},
{
"id": "6429099c4571dd6b",
"type": "subflow",
"name": "Speech Engine",
"info": "```msg.payload:``` The message you would like spoken\r\n\r\n```msg.topic:``` The room you would like the message spoken in\r\n\r\n```msg.type:``` The type of alert, 'normal', 'alert', 'weather', 'critical'\r\n\r\n```msg.voice: ``` (optional) The voice you would like the message spoken in. Will use default if not defined.",
"category": "",
"in": [
{
"x": 100,
"y": 160,
"wires": [
{
"id": "cee17a2c2fbb48ee"
}
]
}
],
"out": [
{
"x": 560,
"y": 160,
"wires": [
{
"id": "98bf66889d4287db",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "font-awesome/fa-comment",
"status": {
"x": 560,
"y": 220,
"wires": [
{
"id": "cee17a2c2fbb48ee",
"port": 1
}
]
}
},
{
"id": "a062d9e6d44506dc",
"type": "subflow",
"name": "Hue Dynamic Scene Handler",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "cee2f20718ddb03a"
}
]
}
],
"out": [
{
"x": 520,
"y": 40,
"wires": [
{
"id": "78a60e2da212f6aa",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "node-red-contrib-huemagic/hue-group.svg"
},
{
"id": "582b8363c9f33bf8",
"type": "subflow",
"name": "Scene Dropdown Cleanup",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "f1c11209a9226be9"
}
]
}
],
"out": [],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "node-red/mouse.png"
},
{
"id": "7cc13ada.b6712c",
"type": "subflow",
"name": "timerange",
"info": "Lets through or blocks a payload\nbased on a time range. This can\neither be configured through the\nenviroment variables in the node ui\nor as described below with a message\nthat has an override topic.\nIf in range the msg will be passed\nto the first output and otherwise\nto the second.\nThe start and stop time needs\nto be defined in an hh:mm format.\nThere is also a week array. The week\nstarts on monday so 4 for example is\nThursday. Payload will only be passed\non days that are in the array.\nOut of time range payloads will\nbe redirected to the second output.\nThe schedule can be overriden by injecting\na message with the topic of \"override\"\nthat contains a ```msg.payload``` object with the\nkeys of \"start\",\"stop\",\"days\" like\nthis:\n```\n{\n \"start\": \"10:00\",\n \"stop\": \"14:00\",\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n}\n```\nStart and stop need to be strings in the hh:mm\nformat and days an array of numbers as\ndescribed above.\nThe override can be deleted by injecting a\nmsg.payload string \"reset\".",
"category": "",
"in": [
{
"x": 100,
"y": 100,
"wires": [
{
"id": "da7f7d3f.da5af"
}
]
}
],
"out": [
{
"x": 620,
"y": 60,
"wires": [
{
"id": "694ce0e1.4bee58",
"port": 0
}
]
},
{
"x": 630,
"y": 140,
"wires": [
{
"id": "694ce0e1.4bee58",
"port": 1
}
]
}
],
"env": [
{
"name": "start",
"type": "str",
"value": "00:00",
"ui": {
"icon": "font-awesome/fa-arrow-right",
"label": {
"en-US": "from hh:mm"
},
"type": "input",
"opts": {
"types": [
"str"
]
}
}
},
{
"name": "stop",
"type": "str",
"value": "00:00",
"ui": {
"icon": "font-awesome/fa-circle",
"label": {
"en-US": "until hh:mm"
},
"type": "input",
"opts": {
"types": [
"str"
]
}
}
},
{
"name": "days",
"type": "json",
"value": "[1,2,3,4,5,6,7]",
"ui": {
"icon": "font-awesome/fa-calendar",
"label": {
"en-US": "days"
},
"type": "input",
"opts": {
"types": [
"json"
]
}
}
}
],
"color": "#C7E9C0",
"inputLabels": [
"payload input"
],
"outputLabels": [
"in time range",
"out of time range"
],
"icon": "node-red/switch.svg",
"status": {
"x": 480,
"y": 200,
"wires": [
{
"id": "1bc56c04.ca0a3c",
"port": 0
}
]
}
},
{
"id": "a4ee891237e460a2",
"type": "subflow",
"name": "Main Scenes Handler",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 360,
"wires": [
{
"id": "ca51f6e6bd51fb55"
}
]
}
],
"out": [],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "node-red-contrib-huemagic/hue-scene.svg",
"status": {
"x": 680,
"y": 360,
"wires": [
{
"id": "4ab49b8485f1886f",
"port": 3
},
{
"id": "9af9a2966a477b33",
"port": 3
}
]
}
},
{
"id": "05a2d9f89e72481f",
"type": "subflow",
"name": "Alexa Location (Room)",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "6088f5b9f13e0e36"
}
]
}
],
"out": [
{
"x": 500,
"y": 80,
"wires": [
{
"id": "8e803251d3e3c3ae",
"port": 0
}
]
}
],
"env": [],
"meta": {
"type": "Alexa Subflow"
},
"color": "#DDAA99",
"icon": "node-red-contrib-alexa-remote2-applestrudel/alexa-remote-icon.png",
"status": {
"x": 500,
"y": 140,
"wires": [
{
"id": "8e803251d3e3c3ae",
"port": 1
}
]
}
},
{
"id": "3aa2aec226246753",
"type": "subflow",
"name": "Lifx Testing",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 100,
"wires": [
{
"id": "8b4af77e07c66df9"
},
{
"id": "54f4bebfc9414dbd"
}
]
}
],
"out": [],
"env": [],
"meta": {},
"color": "#DDAA99",
"inputLabels": [
"Inject Node Here"
],
"icon": "node-red-contrib-huemagic/hue-light.svg"
},
{
"id": "85c4f81ca9628aea",
"type": "subflow",
"name": "Tina Desk Scenes Handler",
"info": "",
"category": "",
"in": [
{
"x": 140,
"y": 340,
"wires": [
{
"id": "9cd0aa12d56438c6"
}
]
}
],
"out": [],
"env": [],
"meta": {},
"color": "#DDAA99",
"status": {
"x": 960,
"y": 340,
"wires": [
{
"id": "8ad119b6c6e11ddd",
"port": 0
}
]
}
},
{
"id": "b88bb63bb13eeb27",
"type": "subflow",
"name": "Alexa Location (Entity ID)",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "b05ef328b90665d5"
}
]
}
],
"out": [
{
"x": 500,
"y": 80,
"wires": [
{
"id": "c2a8a3f1f00bc4b7",
"port": 0
}
]
}
],
"env": [],
"meta": {
"type": "Alexa Subflow"
},
"color": "#DDAA99",
"icon": "node-red-contrib-alexa-remote2-applestrudel/alexa-remote-icon.png",
"status": {
"x": 500,
"y": 140,
"wires": [
{
"id": "c2a8a3f1f00bc4b7",
"port": 1
}
]
}
},
{
"id": "17510314e84badd9",
"type": "subflow",
"name": "Team Color Converter",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "664a1a92c5c5546e"
}
]
}
],
"out": [],
"env": [],
"meta": {},
"color": "#DDAA99",
"inputLabels": [
"Hex"
],
"icon": "node-red-contrib-color-convert/color-convert.png"
},
{
"id": "384eaf2f63dcb5db",
"type": "subflow",
"name": "Input Datetime - With Date",
"info": "Takes a timestamp as input at msg.timestamp and converts it to the proper format for an input_datetime with date enabled. Output is on msg.datetime",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "8b3c203e7e901a8c"
}
]
}
],
"out": [
{
"x": 420,
"y": 80,
"wires": [
{
"id": "8b3c203e7e901a8c",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#C0DEED",
"icon": "font-awesome/fa-clock-o",
"status": {
"x": 420,
"y": 140,
"wires": [
{
"id": "8b3c203e7e901a8c",
"port": 0
}
]
}
},
{
"id": "9766d47584651edb",
"type": "subflow",
"name": "Convert Minutes to Seconds",
"info": "Input minutes on msg.duration, and it will output seconds on msg.duration",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "b2d071ca42e4a3c6"
}
]
}
],
"out": [
{
"x": 400,
"y": 80,
"wires": [
{
"id": "b2d071ca42e4a3c6",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#C0DEED",
"icon": "font-awesome/fa-clock-o",
"status": {
"x": 400,
"y": 140,
"wires": [
{
"id": "b2d071ca42e4a3c6",
"port": 1
}
]
}
},
{
"id": "ea629141206d5343",
"type": "subflow",
"name": "User Conversion",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 80,
"wires": [
{
"id": "11aabd786c07244f"
}
]
}
],
"out": [
{
"x": 380,
"y": 80,
"wires": [
{
"id": "11aabd786c07244f",
"port": 0
}
]
}
],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "font-awesome/fa-user",
"status": {
"x": 380,
"y": 140,
"wires": [
{
"id": "11aabd786c07244f",
"port": 1
}
]
}
},
{
"id": "eccca853a916b662",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Upstairs Bathroom Motion Lights",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"a1ee07ab20229b45",
"74c0ced4ac160364",
"d2df58b074b9ba08",
"83686fab02a3d825",
"853abef16fadc824",
"2ad7be43ccdbdeaf",
"ea02f8930aa2c7aa",
"8859759915625e2f",
"3941b4a5b3493461",
"0b122b02cfb10c25",
"31b8c8291d19ffc6",
"34e2055344eea8fe",
"55e84ccb73ae9b74",
"017de174925e8c75",
"2dc5f9d3e00f4ddc",
"86922621398f4b79",
"a1fa2d2d1f55af4b",
"463689442b9d2046",
"5350d2264880d0ad",
"b9741e2e2ed0448b",
"fd33d3e819d8c772",
"f70e4a4480d43b2b",
"5e00ecbccbe51462"
],
"x": 14,
"y": 359,
"w": 1612,
"h": 382
},
{
"id": "39a7ac02f2727f1d",
"type": "group",
"z": "72f99805df043603",
"name": "Kallen Bedroom",
"style": {
"label": true,
"stroke": "#6f2fa0",
"fill": "#9363b7"
},
"nodes": [
"57651381835f659c",
"acb52adc50d34045",
"b4dbbf788c5a30d2",
"d6b56cb65c2ff140",
"e32aaeb51d3f2e95",
"61405a43f61f3d60",
"62211bf089bc5b04",
"d0dacbae4513b1ad",
"7b390a3b24fc3197",
"a417e93366843249",
"17e5f9acd57c2819",
"a8070806c0f88856",
"7b0648758704fad4",
"3937c38bc1bd0ee0",
"f1dbb3a206dba921",
"476f73cf6b540f96",
"46a1e386f7468d21",
"292cda64df0c1c10",
"a2c9a6a52d4d2591",
"7c483301056c67a9",
"a0dd18613130787f",
"324d56cbdc1eb170",
"ec4682a111a48b70",
"5b3a0cf1ee7d06b9"
],
"x": 14,
"y": 839,
"w": 1552,
"h": 462
},
{
"id": "e065b1ed4938b477",
"type": "group",
"z": "72f99805df043603",
"name": "Master Bedroom",
"style": {
"label": true,
"stroke": "#6f2fa0",
"fill": "#9363b7"
},
"nodes": [
"1aa901d26ce8ac46",
"21001f5409130f44",
"bc592ba259667f9d",
"1f7ac875e593d434",
"7a7f626dce181b23",
"6c06c2eec1583c66",
"e2581a5f3f4888df",
"1dfb0bcc98f1457b",
"096369136e9e607f",
"783cfb381b70afc5",
"1eb13d819ba7e226",
"a10629857d60f774",
"a8ef744455bb4c0a",
"9c01880c6319d29b",
"94c022d2eb71e7d5",
"ce5d8005cbf08144",
"7646c6833d5a1df2",
"8286284fc9598efa",
"cbe37fd5b5fc4381",
"5def5d2440e767b3",
"d153c7a7f050ce84",
"b1c0cca848416d74",
"73c2d06e9114a0f6",
"e914726b0364c6be",
"d613dbf3643d1d4a",
"9014f9e42a6b7c54",
"abd1783e6054329c",
"6a731b17c05f0496",
"86c9f3a3185215fc",
"b7ac7e6a2ad9f5df",
"92ce51a81f7bc58d",
"08335765e8c7eac0",
"b5cfb253dc157cc9",
"6fb6d8041e1a4cad",
"ade887c45bde00f1",
"d6c81a79393be92c",
"88b10efda9e2c047",
"96cf0949902f8572",
"6bbf7df2c43c481e",
"02f922bba32e4c71",
"ffa5d38853e1360a",
"5cce5b011ebc5d32",
"6f4235c9d4f6a6ea",
"862666f576addab8",
"bcef7debc9bda36c",
"5ee549aa5e97d4a5",
"b4d619d31ec9121d",
"d1dd42ebc53343df",
"1fc55a133a7d82c4"
],
"x": 14,
"y": 11.5,
"w": 1312,
"h": 809.5
},
{
"id": "5c50443a84910fb7",
"type": "group",
"z": "3e4ba157b540d183",
"name": "Tina Schedule Management",
"style": {
"label": true
},
"nodes": [
"4d724735025b0ed8",
"6ec62f6cf4fcf994",
"71bee01e93d372c4",
"31ce8ad28dd41226",
"20271b0662a4d5df",
"69886cf636bf4f70",
"16bf625c802d7910",
"a32c37ccf0102258",
"d5c6b45df763e57e",
"6f011420f6bb15a7",
"74bb3d48dd17bef9",
"486bca43ddc48fb8",
"d2c017d8f8c1dc68",
"7a6299413cbbbdcf",
"92c97bdd3ffb345d",
"1fd2518454b8b8a1",
"cc54107a01eca8c2",
"33845d78dadbb4df",
"2a2e328746eed124",
"80fcb34c004369e7",
"5f0f296e4f242dfe",
"d2d529b327823c22",
"8fe032f757ed2b62",
"1e1eb662bad16e38",
"149704b9f6497881",
"b6cb206d9cb34610",
"51b11f9d5b8bfbb0"
],
"x": 34,
"y": 179,
"w": 1292,
"h": 382
},
{
"id": "477e752fcd2e2a19",
"type": "group",
"z": "ee67610b4a0578d2",
"name": "House Announcement System",
"style": {
"label": true
},
"nodes": [
"a4c477269b22f766",
"5095d45c90d5304f",
"3ae21589dd88c080",
"93b7bee28a7e896e",
"b2bc83c9195efe0f",
"f4bfbaca4d7fb1df"
],
"x": 14,
"y": 39,
"w": 1192,
"h": 82
},
{
"id": "46275dd0f9461013",
"type": "group",
"z": "ffa6a885ac41a5ed",
"name": "Functionality",
"style": {
"label": true
},
"nodes": [
"b109c8db1c2cd259",
"75a50e8dac7af692",
"baae5d6f53900594",
"619d1474239faf58",
"ca88f85ba00a6744",
"1d84f0da59682160"
],
"x": 34,
"y": 319,
"w": 532,
"h": 202
},
{
"id": "ff6d8150e8d5e606",
"type": "group",
"z": "b0286fae9f2ce547",
"name": "Living Room Entertainment Mode",
"style": {
"label": true
},
"nodes": [
"3a29cecbefa6cbe2",
"4a2031f363418db1",
"984386fa0a6369d6",
"0beae13503166379",
"6c77ade442a47a30",
"6392f2f0586d988a",
"e505e9f24bf919dd",
"9efd5346a1ca1972",
"8b53b9f4d5ba0bf0",
"cc8f6ab710549be2",
"346379575efad516",
"8b0b39deb5142557",
"7cb8056b3b41a9e8",
"d2390789a8b3101a",
"d961ffeaea408909",
"107f2c88924975fe",
"ed2e0f4f214ad76c",
"6110b45c374a5b7f",
"e5af55b177f37c65",
"27b2c22907382e6d",
"f111c40459e27629",
"33903d3f8f53dadd",
"f463df7e17e045e9",
"4c98b4516ab685ac"
],
"x": 34,
"y": 19,
"w": 1272,
"h": 502
},
{
"id": "208284848b13b85b",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Front Door Awareness",
"style": {
"label": true,
"stroke": "#ff0000",
"fill": "#ff3f3f"
},
"nodes": [
"97a441f1ac510844",
"fbe3667814a51f6f",
"ec543bc9adac3d08",
"d4019d35bf5a5f98",
"25e12d8e4a0a7f11",
"e91c3392b59ff9d1",
"981191938ab4ee2f",
"59af14a564176ce4",
"3c83c0ab0aa96e3d",
"7b71cb1967ec5255",
"03fad0a960ff39e7",
"c0933fcc8737bc0b"
],
"x": 94,
"y": 179,
"w": 1032,
"h": 322
},
{
"id": "1ca205a84922c8c2",
"type": "group",
"z": "4a8821853d4dd1ad",
"name": "Finish",
"style": {
"label": true
},
"nodes": [
"923538ef97772f0c",
"a3e3dc438a7b95fc",
"fe1ba086baf93ec0",
"50056b099a24a824",
"d8e2d16e313b938a",
"b0c92a72557d0ac6",
"408795055634e897",
"0a441953c41a18ae",
"08a22fa71fce5e91",
"d580c539c554a4c1",
"f0cc7b3b9622312a",
"206e512c5268020f",
"4da18a3f1e0298db",
"283661388275a459"
],
"x": 34,
"y": 559,
"w": 1012,
"h": 382
},
{
"id": "5595964c8367c984",
"type": "group",
"z": "ee67610b4a0578d2",
"name": "Text Notification System",
"style": {
"label": true
},
"nodes": [
"98626a8f2b59bde3",
"db6d955c039873be",
"d2fec32d385dae8c",
"0145961e8276c53e",
"fd623c46a558a01a",
"c52cae79eb97bcc0",
"6b039ef7895476e2",
"f44427c5a493c428"
],
"x": 14,
"y": 139,
"w": 1152,
"h": 242
},
{
"id": "eeafd13be593ae69",
"type": "group",
"z": "b5717a86ce55bc29",
"name": "Front Porch Light Timer",
"style": {
"label": true,
"stroke": "#92d04f",
"fill": "#addb7b"
},
"nodes": [
"091390f43bfeddf5",
"7a7229eb69c9b1a3",
"f34816b23181f21e",
"bd75b077a1c76fce",
"b69eeb738bbd4bdb",
"cfdcc7c9c168dc17",
"16029ccf061bdd10",
"d2751bc2cfc5af8f",
"435280acadb9f364",
"ec5937bc60874009",
"defcae57f9916394",
"459433738b64d14d",
"a2ec35a79d79bf2f",
"9a8c39dc1a0c20e6",
"8c29a2e1a06c5524",
"c7a8df4ebeb3b5c5",
"77759257dd9c9465",
"3a5bb57569e07beb",
"76815f07ec2f3eef",
"f5fb96bf1a33b3cd"
],
"x": 54,
"y": 119,
"w": 1492,
"h": 282
},
{
"id": "0c81dfaed25d225c",
"type": "group",
"z": "9a8e84bd2945505e",
"name": "Amazon Package Delivered",
"style": {
"label": true
},
"nodes": [
"11f5f6e0f1e4da25",
"3250ca66d8342dd8",
"6091f5e58812f97f",
"32816b7834e1b318",
"02cd94391e205cd9",
"059eaa30829a743e",
"a71c61b06a3e7b0d",
"1504548e7ebc3844",
"d8b6743cb853018d",
"ddbbde89f52be826",
"9726bd70b6b83774",
"5fbac3420d43ef9d",
"d336afe957a65e33",
"e2f0e53daa198581",
"398d300c5d0b6db5",
"d92ae2f7fd3171b5",
"96496719d1c09515",
"15fde8d3275b8455",
"fe7b309fe37cf8e2",
"458ddfa9d748f88f",
"37bdac2c9a4e2837"
],
"x": 54,
"y": 39,
"w": 1652,
"h": 382
},
{
"id": "8aee4d340a136bac",
"type": "group",
"z": "eff21041cc941fef",
"name": "Downstairs Bathroom",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"5123a607588fa737",
"f84e6b5157e857cf",
"b7d94cd0e420c650",
"41a8d5ef20cf55d7",
"3e40025ac99ec712",
"8d2e7fb5f214879c",
"b281061a4b08d2eb"
],
"x": 14,
"y": 879,
"w": 612,
"h": 262
},
{
"id": "550e5b2d99316b12",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Basement On",
"style": {
"label": true,
"stroke": "#0070c0",
"fill": "#3f93cf"
},
"nodes": [
"1f5808147fa975cf",
"1966d10d8f4467c7",
"a9bc78f321149316",
"b3bb08ff51e46985",
"0c7ef72bd0ef47d4",
"795c53ad6642733a",
"ea5306d6f92d9550",
"4829663e9913e2aa",
"61cb79c998ee0b59",
"73078f818abdc6c2",
"2516c6e3146cc851",
"d6e7197427bb4d1b",
"4b7ed8ad595ee9cb",
"b7022ac46a70a7d8",
"a64928d7a0b836cf",
"aecc95a3db3369e2",
"bd6bdc6ed9aded9d",
"3bd0a22c66de228a"
],
"x": 94,
"y": 839,
"w": 992,
"h": 322
},
{
"id": "f519aff597ece351",
"type": "group",
"z": "bb961e59e2ef86c9",
"name": "iOS Actions",
"style": {
"label": true
},
"nodes": [
"14c6951746b58a38",
"533921a587f031d4",
"65240dc52617459d",
"d3763c0194214956",
"638703bd017d6e5b",
"bc5f205fd5e7582e",
"1516f464e4d87c56",
"e21a948e9523bce7",
"6ec2fd7aaaf1fc98",
"c5e9589db7e0b0bf",
"50cf93faa2e3996c",
"89f6119d5702185b",
"15ae48c0b6e70f36",
"572b2040be874f4e",
"b57e12eb73074535",
"93b718cd47747ccc",
"c8af362d48d5c0ad",
"3463c4f2bf6388fe",
"9d1cf8af02a6c86b"
],
"x": 54,
"y": 39,
"w": 852,
"h": 682
},
{
"id": "26f91eb2ef77450d",
"type": "group",
"z": "bb961e59e2ef86c9",
"name": "iOS Notification Actions",
"style": {
"label": true
},
"nodes": [
"f5aff29df4e07a4a",
"7107656a6cbecce7",
"6bb57058f0a576e7",
"e97b782efaaf5976",
"d8c62e34298105b4",
"900c251ff10a2f5b",
"2a0e3a76af7ab628",
"53102bdc5d885602",
"a169eca7f3f1df15",
"2b63f908be8296d0",
"0be3c318e9e6df0a"
],
"x": 64,
"y": 759,
"w": 1022,
"h": 162
},
{
"id": "a46fc8e7e70ca893",
"type": "group",
"z": "4a8821853d4dd1ad",
"name": "Start/Pause",
"style": {
"label": true
},
"nodes": [
"7fc67fc156c0f4be",
"34dcb204b421710d",
"797d3e7cc53d773f",
"e69ad4771494c458",
"fdf9b6820eb7289a",
"5c44fd504453ae63",
"908543f7b78f7beb",
"dd0be4a0dd77e1db",
"d6728df5d1fdf67e",
"ae7073e78053da5d",
"6b086807971b2618",
"6736626753b33834",
"736d7433005436b3",
"0aa29248b560c45d",
"b8ca8a1a2655570b",
"24abb932c4cd0b1f",
"c0521b53f7efeb17",
"95d5ac486b4f9ee0",
"49767cbfa622a734",
"04113ab4977bf725",
"93a52960301bb3a3",
"0e39331337b021bb",
"82172c8ab1a9c8e2",
"afeb1d238a623c3d",
"49dbe17ff03ed572",
"9612270d4cdfbf07",
"1a0adfa82fff507a",
"27ae9c023ee2d1f6",
"88d088ea70f0030a",
"86c7f29776a59797"
],
"x": 34,
"y": 39,
"w": 1812,
"h": 502
},
{
"id": "6504d94aaaf9b8d9",
"type": "group",
"z": "ffa6a885ac41a5ed",
"name": "Power Stats",
"style": {
"label": true
},
"nodes": [
"ce8a6bb6e9460f13",
"ce5a2ea26f26e421",
"abb6e16585d7fe61",
"aa9b2f0ddc5b77d3",
"0a8426dd99cbaeec",
"8813b152ed76b96c",
"9833b2aff0f97ea9",
"51d05298561cfddb"
],
"x": 34,
"y": 39,
"w": 672,
"h": 262
},
{
"id": "265593f442864b6a",
"type": "group",
"z": "3e4ba157b540d183",
"name": "Climate Variables",
"style": {
"label": true
},
"nodes": [
"a09f10883f07aad0",
"464e9271285f8450",
"9c8056404bfcafed",
"a8d7f5e5d4f549b0",
"706c517f3575c162",
"4a507797422a5369",
"a232c2f584013596",
"738e35a2f51ff0e0"
],
"x": 34,
"y": 579,
"w": 792,
"h": 302
},
{
"id": "931cc27100c9317e",
"type": "group",
"z": "3e4ba157b540d183",
"name": "Last Alexa",
"style": {
"label": true
},
"nodes": [
"04fdddae578ee136",
"266634bf3c6019c8",
"4560584de593b5c1",
"488e4f61d16705d4",
"1f3142828a586d08",
"f9bc4d36a0df7947"
],
"x": 34,
"y": 899,
"w": 672,
"h": 222
},
{
"id": "6e83103b5c5311e9",
"type": "group",
"z": "3e4ba157b540d183",
"name": "Jarvis Voice",
"style": {
"label": true
},
"nodes": [
"e8d2135bb5564a4a",
"f6f45d3e3cf9aeab",
"40c9c33453179a21",
"b49f0642ce0153c6",
"a75651492e779bfc"
],
"x": 34,
"y": 19,
"w": 912,
"h": 142
},
{
"id": "88f099618e56926d",
"type": "group",
"z": "458e4c0055c8c533",
"name": "Master Bedroom",
"style": {
"label": true
},
"nodes": [
"9256f78107619596",
"fbd0b0d52ef452d5",
"1f44e8f6e98317a7",
"efec6f0b8a4ea382",
"cfcebd8452629535",
"0bfb330d42161fe7",
"216ebd5138f63087",
"e82fb1576245b7c7",
"67e6798433b7bc37",
"99c141f21de4feda"
],
"x": 74,
"y": 39,
"w": 1132,
"h": 262
},
{
"id": "a6de35af12739885",
"type": "group",
"z": "458e4c0055c8c533",
"name": "Kallen Bedroom",
"style": {
"label": true
},
"nodes": [
"5f4a234984a654e1",
"9ad1aee4f432c0da",
"33f1bded52754848",
"72052e61710200f9",
"9c2ea97d481e6428",
"56140b60b6406bd7",
"067bcc91d6a04be5",
"7f3909f76041b209",
"724f186878227dad"
],
"x": 74,
"y": 339,
"w": 1132,
"h": 202
},
{
"id": "0804d9edeca1c9fa",
"type": "group",
"z": "458e4c0055c8c533",
"name": "Emma Bedroom",
"style": {
"label": true
},
"nodes": [
"eff279edcac37798",
"adcce6ca1e459cd1",
"49a842a41a52f8f3",
"e036fd18c5d20645",
"9621d4c881da0188",
"a5a387d3522f49ed",
"53f8d279114dd476",
"4523045453de0a33"
],
"x": 74,
"y": 579,
"w": 1092,
"h": 202
},
{
"id": "385f03591bc34bcc",
"type": "group",
"z": "3e4ba157b540d183",
"name": "Temperature",
"style": {
"label": true
},
"nodes": [
"274be2385ae894ce",
"dcc947fe66b6342b",
"15f7382daddb4b3e"
],
"x": 34,
"y": 1139,
"w": 632,
"h": 82
},
{
"id": "31767ffd6a647579",
"type": "group",
"z": "eff21041cc941fef",
"name": "Doorbell Alert",
"style": {
"label": true,
"stroke": "#92d04f",
"fill": "#addb7b"
},
"nodes": [
"c983b44381b46ab5",
"bc3e0a041efec910",
"2c351b21e13b7289",
"71e6ae54dc1b958b",
"41ababe9cfbe1297",
"c0ce3c040d25e0a1",
"e67a2b594c648ac6",
"e8510a6c66cd84e6",
"2ebe03f5023de47c",
"12e827e7416c9dac",
"e3ecd23a34c7f82e",
"58b11f0c0353d67b",
"45df5f447e52cb0f",
"e23e7b080ee3773f",
"1e1059008d19c0ee"
],
"x": 14,
"y": 359,
"w": 1532,
"h": 282
},
{
"id": "1cc8b382530c33d0",
"type": "group",
"z": "b0286fae9f2ce547",
"name": "Basement Entertainment Mode",
"style": {
"label": true
},
"nodes": [
"496fafb580e8af1b",
"6253b68980f8bbca",
"19907ff0b6cef449",
"98d5f1fa7001b848",
"8535d555f858eb5c",
"d2d07f8ee20733d0",
"7d266754621825e7",
"d41365c49024c8eb",
"c71a9ea311a86b7f",
"5d582639d1f6a501",
"cb285727507f50da",
"2a8f44429acdd1ea",
"50b997d6e5680e6e",
"65aaba2528dfde3d",
"55962141df8ef164",
"5ff13862fb36f90e",
"99fccb06d0ae097b",
"f3efe80c6ffa4522",
"74d645f646c713d2",
"cb68f561b5023b31",
"8146f43fea5aec03"
],
"x": 34,
"y": 539,
"w": 1192,
"h": 502
},
{
"id": "b9ffa3fa5af46ec3",
"type": "group",
"z": "ebd5561c4f077718",
"name": "Weather Briefing",
"style": {
"label": true
},
"nodes": [
"5d7c63526234945e",
"7aaddacf84721c78",
"6b5d3e550ad76528"
],
"x": 34,
"y": 39,
"w": 752,
"h": 82
},
{
"id": "4329e464360d0afa",
"type": "group",
"z": "ebd5561c4f077718",
"name": "Lightning",
"style": {
"label": true,
"stroke": "#ff0000"
},
"nodes": [
"d7c2eec75c6063ea",
"75c4dc9367328035",
"abb24271518ddd9b",
"6f29823ba252aef8",
"b6e069ac0ebfe31a",
"6c529210810a63a8",
"b4b80e91a535923e",
"1180e4c40c3ec0fa",
"b64b61c5bfd91293",
"70f795fb061cbfef",
"7809c760322bf72a",
"8ffd3e28319fc173",
"be9ebf6d2f7e18d0",
"b2c0d6629b2603b7",
"c268e2512a503e2a",
"1e79cbc1d6e8f507",
"dbfb74297b6ecd61",
"81c14eac4de9dd9d",
"a586df67c15b0914",
"4738fd26d0e16bd4",
"84f3e5a7cf5cdfc7",
"50a2a473686b0445",
"33fcb96a4c2c2541",
"a4d27381bd614fd1",
"8a84615173fd7e97",
"f260e2410571356a",
"b497fe229c8f2eea",
"f47a0d107875d550"
],
"x": 34,
"y": 139,
"w": 1592,
"h": 422
},
{
"id": "395da9d5d5f7e232",
"type": "group",
"z": "d49b385d8b582b20",
"name": "Context Examples",
"style": {
"label": true
},
"nodes": [
"c80bec9a15b703f6",
"8687551e01cd2045",
"103b03c39c8d9cae",
"c043cba9f34ba574",
"e674c706437cc0f3",
"11f8fb75d4c4e6c0",
"1346e34e8c83b2dc",
"62d522a844321ef9",
"6d109daff443dade",
"4e1848c867860d5f",
"3102e176923a8fad"
],
"x": 34,
"y": 719,
"w": 732,
"h": 282,
"info": "https://stackoverflow.com/a/74399359"
},
{
"id": "c3dc29879117218b",
"type": "group",
"z": "d49b385d8b582b20",
"name": "Climate Tester",
"style": {
"label": true
},
"nodes": [
"5848c6edf2bd06fe",
"3bb9755d18f517d6",
"c52f61fa427a773c",
"d71d65c0e52926b1",
"84b00411dee5fc6a",
"8a4b246d2356d8f4",
"d275a12c1817925e",
"4d9e5c1bade281af",
"330eaf3afee1c405",
"c59db4f3f0112244",
"8846ee22051b92cc",
"4731a08756c9235f",
"62f2704dca41ea4b",
"93072f995377775b",
"34c4939c3dd1f7d1",
"71f5f2a1557b28ea",
"b233bf44f92d413d",
"a1020d4eaab8a8e5",
"7aa9383895c46e30",
"401d1612749a4d86",
"514057723d9662e0",
"1df32d98b498c875",
"192260163c49816a",
"79f3ceee718cd7cb",
"14181143d23aa423",
"f9e1aec6c25f6480",
"0693239363c59c3e",
"44b7eabdec8197a3"
],
"x": 34,
"y": 19,
"w": 752,
"h": 682
},
{
"id": "50e4d951ee7b3e54",
"type": "group",
"z": "873eb2575d6e9014",
"name": "Report System",
"style": {
"label": true
},
"nodes": [
"f803c6af3a30eb66",
"a6234b2047ba3116",
"427cc2991454bbf0",
"7674185d1e5ee489",
"9e43408e18883dfe",
"84c8fd3cc1ab7cf1",
"c66df253518a4507",
"2b6f06b27b6deb92",
"a64cee24cd3523c5",
"e2e2d2fb7277cde3",
"ea0bab7efe2d570d",
"f8330684e1ccac8d",
"d31d41f3e474e0c1",
"6d9c53b7dd7b0cf3",
"c5e85490ce1d4a57"
],
"x": 34,
"y": 19,
"w": 1452,
"h": 222
},
{
"id": "23b02b1256dfd302",
"type": "group",
"z": "ffa6a885ac41a5ed",
"name": "Mosquitto",
"style": {
"label": true
},
"nodes": [
"939abd584ee8580a",
"6b17d7fa4de2b620",
"e2a8c8b2638be79f",
"96baea4b0d08d151",
"8357b66291d6f498",
"76eb43f2c84142f8",
"1dc56852c1691e89",
"b2a69c7d24c170ad",
"0f107a6c4d46cdc8",
"79822e9d0a97457c",
"ef26acc3d75b5b93",
"d790797e62163c2b",
"463eb1286393993a",
"396cee5f3aa5255f",
"af22ad5de7f824ed",
"cb37ef0a4c6a0d4b",
"538a80f1ef807ce5",
"8bc88748bdc7fec8",
"ca36c535f62a938b",
"fe5a9d13c3acdf8a",
"704c78f0839b0cbf",
"a98df8034046bdc1",
"fe27369f5d336321",
"1812eb70af41b475",
"6e7294be1430b43a",
"60b562a91a724301",
"ed548a3f33ed2137",
"9df778270aff32c7",
"5f6468dc8b022b6b",
"5486cc70a2a83cd0",
"c95f5ac879cfef5d",
"ccebc1def6a944d9",
"a675ad54d1ec36fa",
"0723c20ffd541ca7",
"6596ad2f0c91a78c",
"bb4ca3d4e66d87a5"
],
"x": 734,
"y": 39,
"w": 512,
"h": 802
},
{
"id": "f16f28689b7ec2b4",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Stairwell",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"f18aab5a5bda9a84",
"293a957a5c4f79fa",
"96e7237a63089317",
"33ba5ffd653f09a1",
"0df82708f1ef261c",
"48c2ad199a4ab538",
"4e3d058c164d6a97",
"76423fc24fedb52c",
"48c5c102461f0981",
"b05b87a1e43f11f9",
"ef677459c795d246",
"1f1489a0514e233b"
],
"x": 14,
"y": 759,
"w": 792,
"h": 382
},
{
"id": "ba738e13229c781b",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Emma Bedroom",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"c3f2a4aa281295ce",
"3b698d0a4f2620bd",
"55c893b1d3009fed",
"b058c2262ac522ff",
"b542615d3dee41f6",
"fc25e2a837ec8229",
"440fc7142e7345d4",
"cef61cdb2808ce5a",
"0367216416de8b4d",
"03075516f3003707",
"2e356bc6f1ad80dc",
"c9d498c1e323b1e4",
"f7bd6d5fabdba0e0",
"515f7471cec7bce2",
"ca85b450d07da81c",
"40dae72402f8cdee",
"bb3469b3ec117aab"
],
"x": 14,
"y": 1159,
"w": 812,
"h": 502
},
{
"id": "0f7fdf39e4400032",
"type": "group",
"z": "eff21041cc941fef",
"name": "Living Room",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"87d449113f439710",
"29c0dbf6add54879",
"7305cfffd320c75a",
"f511cce02d6ad811",
"130c6ac167cd49f0",
"7c33144c3e356edf",
"bcbc098444744cbb",
"f31cabbf0dd66d75",
"c96c398bc26cfc26"
],
"x": 14,
"y": 659,
"w": 1132,
"h": 202
},
{
"id": "dcdfa098347020de",
"type": "group",
"z": "eff21041cc941fef",
"name": "Back Door",
"style": {
"label": true,
"stroke": "#92d04f",
"fill": "#addb7b"
},
"nodes": [
"74f9d2bf4a8c0b53",
"5e7a082800eeb73c",
"f0ef9a565f72dcae",
"1238a342e440e582"
],
"x": 774,
"y": 19,
"w": 812,
"h": 82
},
{
"id": "c4c2c79b692236a0",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Basement Shutdown",
"style": {
"label": true,
"stroke": "#0070c0",
"fill": "#3f93cf"
},
"nodes": [
"56c84e793b8b0d79",
"9751c5a6a1b98b7d",
"a4490fb4765e1c9c",
"0cfd7edd88cfa0de",
"4c7184cd35bf3f1f",
"4681a8b5fa2d942c",
"09dd0d2cf254619e",
"bbcf0451ac4c4cd4",
"f052c9629cad7a5f",
"80c5f8a40169fcb7",
"a9bbf53b9584976a",
"cc0407d29b656ca6",
"fc1ca3e2f921b01e",
"18cd2aed123cdaa8",
"8851dbeb9b28003a",
"06b3f795ae9e14e6",
"15c84d12d17ac254",
"b947106d8f7b72ed",
"d575b0381d31edaa"
],
"x": 94,
"y": 1179,
"w": 1492,
"h": 382
},
{
"id": "f4057835848d0904",
"type": "group",
"z": "5c4ac37140a54ac9",
"name": "Goodnight",
"style": {
"label": true
},
"nodes": [
"ba97906b7b81342c",
"d9e39b8ebb86c941",
"09c7a61f7a4c4d05",
"280e2a7895ca63fb",
"60ce44747cf3e507",
"50e351d1ee6108b3",
"33773b3aaa551b79",
"f30486c8e11db0e4",
"9bd4665845af0545",
"20b3699a56b0e901",
"f3df71ec460b7609",
"775777f1c01e424c",
"334c28e08be1db12",
"de09ef54cbab864a",
"5c919106ebd7c9d4",
"75072695f27adae7"
],
"x": 14,
"y": 239,
"w": 1092,
"h": 322
},
{
"id": "7d1c0a1099be4427",
"type": "group",
"z": "5c4ac37140a54ac9",
"name": "Good Morning",
"style": {
"label": true
},
"nodes": [
"105271e0816c6a52",
"2854170262757e84",
"5c9c73b7adb72896",
"c18d27a9438bfa08",
"ef0efdc23805d872",
"bad6373b442c58a1",
"54b8bca62d27e659",
"708843ea29ee6626",
"bb77b36dd4d9cc96",
"2fb85204eb56f86b",
"3778a9f4cb80ce0b"
],
"x": 14,
"y": 19,
"w": 1072,
"h": 202
},
{
"id": "553ecd620357c03d",
"type": "group",
"z": "5c4ac37140a54ac9",
"name": "Kallen Activity Commands Flow",
"style": {
"label": true
},
"nodes": [
"8c4d01db6f6ef33e",
"20ede2b52515bc63",
"88c56b0964f9a6db",
"38e168a79848fa19",
"86cd67e28114a585",
"5926b0004a47dfd1",
"50982205a91e63c5",
"254ffc8e8bd1d414",
"c43b69d84deb44a4",
"65589264d77f668d",
"6167d4da61990bfb",
"2aa8397f85a8ceed",
"9f1c60a822a2b550",
"dff1ff1e18a1bc74",
"9e3c9006ff125d9b",
"efd47cbc26ed2810",
"75e1b9f265ecb4e5",
"c2212b77414c61f3",
"1383f8e6ebf8ad88",
"7d53b4bd4c7ea874",
"4726a2605a1f56cc",
"506e7e645cf06383",
"716d4f60c2af0f2e"
],
"x": 14,
"y": 1039,
"w": 1192,
"h": 262
},
{
"id": "ab4dbcc968a1d346",
"type": "group",
"z": "eff21041cc941fef",
"name": "Mud Room",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"de9fe68a439b4c41",
"7c4cc52be117251f",
"a7cd304d11f25e60",
"ddae3391e8b78cb8",
"0c70e666ebfcd6c1",
"67d04dc394a23636",
"d4c7136ad434c2b5",
"95fe501e85a5f65b",
"5d9a85d3534d83e6",
"fa7c83f1dece9741"
],
"x": 14,
"y": 1159,
"w": 792,
"h": 322
},
{
"id": "5c1df7492351b925",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Kallen Bedroom",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"f3824e4c7e202605",
"4954c509d4d697e2",
"9a8f53db7d3ed3b7",
"bbe9fd4eff4e6a04",
"f6aca47ad4719dab",
"1a63ea711d6658b2",
"0b5424aadc3479f7",
"5524e8ba9b5545be"
],
"x": 874,
"y": 759,
"w": 612,
"h": 262
},
{
"id": "505e378279011759",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Master Bedroom",
"style": {
"label": true,
"stroke": "#001f60",
"fill": "#3f5787"
},
"nodes": [
"e270c73896a1a50c",
"3063e6a5b5c3f677",
"31686303c43971c7",
"f14572686bbbbf9e",
"602869aebc96184c",
"cfb6cf1f5f583447",
"4a431478798a51c8",
"81129efa6676b58e"
],
"x": 874,
"y": 1039,
"w": 612,
"h": 262
},
{
"id": "d70533ec9ef234f6",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Do Not Enter",
"style": {
"label": true,
"stroke": "#ff0000",
"fill": "#ff3f3f"
},
"nodes": [
"b62ba31a1b35ef47",
"e8b5f4ace78d485a",
"d7b73ee4a2387bfa",
"6e5bbaefb1d2c14e",
"117e6e67bd4c2794",
"efa4a1761da0b38d",
"6d1291b96a8c9e83",
"b8648d760ccc1aa2",
"e8097cd64b17370a",
"9d5f6c64408c0b6a",
"21496cb5b59bf2fb",
"be40ebfb2514fdb2",
"724968ddc9702720",
"195c2b19593434e1",
"e75fda5ea26d23e5"
],
"x": 94,
"y": 519,
"w": 1412,
"h": 302
},
{
"id": "1f3d367ed3e35f1f",
"type": "group",
"z": "ce79e27ec84983a9",
"name": "Doorbell Battery Saver",
"style": {
"label": true
},
"nodes": [
"85f64d70ea1ad38b",
"3762233dfe00d338",
"0c394f2de9bd9917",
"eb4303c234c0f911",
"5173aa5c7adb827a",
"b36a4f453c2a06b2",
"977f5fdca9aaa918",
"42a6971dbcdf2dd7",
"160249109f0b494a",
"090187e752453a53"
],
"x": 74,
"y": 59,
"w": 1292,
"h": 162
},
{
"id": "d782e62a03a086e0",
"type": "group",
"z": "ebd5561c4f077718",
"name": "Defiance Weather Alerts",
"style": {
"label": true
},
"nodes": [
"8f8450555dd6ac73",
"c8a8f9eb6f370ae2",
"ad598f14adf7a284",
"895863cc6c4cc732",
"724bd8b20f6442fd",
"26c646de6e0b35d7",
"b3e4269945739cfd",
"90a129b1d1a3f1c0",
"b004375f406eccef",
"86435078e9067a09",
"a2af8db4d82d572c",
"9958da4d6712625b"
],
"x": 34,
"y": 579,
"w": 692,
"h": 262
},
{
"id": "d96ff91f5f860dcc",
"type": "group",
"z": "ebd5561c4f077718",
"name": "National Weather Alerts",
"style": {
"label": true
},
"nodes": [
"ca1f406359324108",
"9825ebb82719c364",
"10ca3d9808f3da42",
"6e65ea4c68e8520c"
],
"x": 34,
"y": 859,
"w": 732,
"h": 142
},
{
"id": "3e78b849c3a85b84",
"type": "group",
"z": "5c4ac37140a54ac9",
"name": "Going Upstairs",
"style": {
"label": true
},
"nodes": [
"80761160776018a1",
"c3b3c90a43c4481a",
"12ad9b1c6c0e05bd",
"28d9251be3529bfe",
"2b2b73eed26a4ac6",
"8d992470168b48db",
"27862f1fd0313891",
"c7302971bce3d542",
"96cb27c48ddd3087",
"adb36e61e39c7fa9",
"8c4ddac65fd3b245",
"56a4fbb75463258c",
"881f3f534e5cc523",
"b077b050fad45521",
"b1f93c10edc4ff47"
],
"x": 14,
"y": 579,
"w": 972,
"h": 442
},
{
"id": "fc9cdd0818afd119",
"type": "group",
"z": "3e4ba157b540d183",
"name": "User ID List",
"style": {
"label": true
},
"nodes": [
"430d9054095580f1",
"7b2670a81b8d3967"
],
"x": 34,
"y": 1239,
"w": 392,
"h": 82
},
{
"id": "c098aadcd6f83f58",
"type": "group",
"z": "d49b385d8b582b20",
"name": "Context Tester",
"style": {
"label": true
},
"nodes": [
"1a2b9228fd8343b7",
"f614d201285aac68",
"9e59e83b39d1ce29"
],
"x": 794,
"y": 319,
"w": 632,
"h": 82
},
{
"id": "8bee7892a01cf63b",
"type": "group",
"z": "d49b385d8b582b20",
"name": "History Tester",
"style": {
"label": true
},
"nodes": [
"d812ee2f617dd583",
"d417bebd83c3e0fe",
"a89d872a45eae06c",
"d8facf95084f1638"
],
"x": 794,
"y": 419,
"w": 792,
"h": 82
},
{
"id": "5802ea32c1de36e8",
"type": "group",
"z": "72f99805df043603",
"name": "Emma Bedroom",
"style": {
"label": true,
"stroke": "#6f2fa0",
"fill": "#9363b7"
},
"nodes": [
"e0ccc1c73ecf40cb",
"c0b160cbf7cb26d9",
"2370770ce10c8a17",
"69a01541c0c04367",
"4a4335e390443134",
"be5db4b6e0dc6207",
"a2635913609af931",
"3421222c0667a9ef",
"c9d1ed9d0ea401e6",
"34d7881576b29949",
"1e2abb7eff658e81",
"f5d407ee3f07dee6",
"b4f3d9fd20c0637e",
"ccb3a655b7d6836b",
"7561647f2cdf58d3",
"8c5fb72719e1917d",
"fc5cad0242d957aa",
"33d2a06ed0659a13",
"61f25466213cb85c",
"f6755ee93883b34d",
"7631b8823839f4b1",
"884ffbd2493411f9",
"15b160d6bfe30b15",
"03c668f84022cc23",
"a273dadf7a256af1",
"8bb8dc720af76714",
"bb9595faa1592fd9",
"ddef9ad0ac0a98a0",
"71b1c6e934b85637",
"334a79e6f5f3a16a",
"2718f2695ff412fa",
"7d50b11bbf5de8fd",
"53b440a31d30df1b",
"f1f2ac113fe2b639",
"b96ad84b569ac360",
"894e510fd44b01e0",
"eee837a3c93b3abd",
"2a02683008423af4",
"057eda6b0cd976d9",
"6f9810d3986b67d9",
"15e2eb94a67c7024",
"77082c90f1eb9c32",
"88037340df0708d0"
],
"x": 14,
"y": 1319,
"w": 1092,
"h": 742
},
{
"id": "a09584861c2fe558",
"type": "group",
"z": "72f99805df043603",
"name": "Master Bedroom Climate Debugging",
"style": {
"stroke": "#ff0000",
"fill": "#3f93cf",
"label": true
},
"nodes": [
"ffe28978275ac1a4",
"e2c62d1cba780500",
"2d79ecea5a6f4fa8",
"7bd9e989743a6aa2",
"3257d2fe36755d37",
"74783fb85da3edbe",
"002858f9b16ed975",
"97f433c699d1f83e",
"1f2b0cb7e79e145a",
"62b761bce85aecb7"
],
"x": 1374,
"y": 79,
"w": 352,
"h": 622
},
{
"id": "bf0e3e8c2f5a5474",
"type": "group",
"z": "3abb5ae57afb4761",
"name": "Tina",
"style": {
"stroke": "#6f2fa0",
"fill": "#9363b7",
"label": true
},
"nodes": [
"49dbd6d6cba1b010",
"a0c7649e26e66ddb",
"898659d514aa58fd",
"35d7371023527600",
"9ae7e308f889137d",
"edaa6ff605ba6fa7",
"bcdf2e5f1249631d",
"7992545819db1a42",
"ec497068c3a61d02",
"10228956c46b8d7a",
"2851173db6835eda",
"82c0fb65066f3b67",
"7fbab2c7cb7ecc92",
"5e72a180d8f0232d",
"9d03fda88310da78",
"8a22032494f84cae",
"8c910479678a8f5e"
],
"x": 74,
"y": 399,
"w": 1192,
"h": 422
},
{
"id": "7821289ad49774c9",
"type": "group",
"z": "3abb5ae57afb4761",
"name": "Tony",
"style": {
"stroke": "#6f2fa0",
"fill": "#9363b7",
"label": true
},
"nodes": [
"134433d6e21dab5b",
"77857e77d43a9d2e",
"379edcf9fe985ebe",
"e6bdfba61c73d081",
"7169f007c32ccc46",
"41aa4436b55474b2",
"bf504c30194524b9",
"0a039e097233b977",
"8c7c1cd31a824cd5",
"24a89088d5503778",
"f54ba77dfe1e7ba4"
],
"x": 74,
"y": 59,
"w": 652,
"h": 322
},
{
"id": "6a0fc544a641af5f",
"type": "group",
"z": "3abb5ae57afb4761",
"name": "Outdoor",
"style": {
"stroke": "#92d04f",
"fill": "#addb7b",
"label": true
},
"nodes": [
"26f15fc8d75a4020",
"47aa56df01f697fc",
"c46dfcaa9a2798f0",
"05547a934bbcab4d",
"ff44de8d65439a5f",
"5f8b61ddc9963e99",
"0ba46659c49cf39a",
"025e65a78727f99e",
"788f7cfdfa2fdef9"
],
"x": 744,
"y": 59,
"w": 672,
"h": 282
},
{
"id": "6c0f29670fcc9493",
"type": "group",
"z": "3abb5ae57afb4761",
"name": "Kallen",
"style": {
"stroke": "#6f2fa0",
"fill": "#9363b7",
"label": true
},
"nodes": [
"cd4d8dd6b1d34f49",
"5193627a30d1b32d",
"fb1afc4c2078ca29",
"43048b96595e3e97",
"8e081e76e5f19ead",
"156d50efeaeb681c",
"8a450e797b413418",
"8584a491587be9a2",
"547753c8de135e69"
],
"x": 74,
"y": 839,
"w": 872,
"h": 262
},
{
"id": "e74c2fa5c53fd805",
"type": "group",
"z": "3abb5ae57afb4761",
"name": "Parents",
"style": {
"stroke": "#001f60",
"fill": "#3f5787",
"label": true
},
"nodes": [
"351ac66c934832eb",
"df53af0726555079",
"331ed2d217025fd1",
"0eaa398b977e03b5",
"63dc161e193d33c5",
"84a56bf51e79fd4d",
"8811ce1d8dacd3b1"
],
"x": 74,
"y": 1119,
"w": 712,
"h": 202
},
{
"id": "205da12d712d058b",
"type": "group",
"z": "3abb5ae57afb4761",
"name": "Nerds",
"style": {
"stroke": "#001f60",
"fill": "#3f5787",
"label": true
},
"nodes": [
"663b5401ea953d2d",
"802ff36b76e55809",
"a999c33047fc3b61",
"84a2692b31e7d7d8",
"bf5f6c5af1c02315",
"dafcce5a61b19f8b",
"4e97de53400335b9"
],
"x": 74,
"y": 1339,
"w": 712,
"h": 202
},
{
"id": "c19f180ec1dc0bcf",
"type": "group",
"z": "3abb5ae57afb4761",
"name": "Family",
"style": {
"stroke": "#001f60",
"fill": "#3f5787",
"label": true
},
"nodes": [
"028e16d90ac7433d",
"d5a9248680297b56",
"b8ef333da370f91e",
"1ac137ebc9f53e3c",
"66b7ec9a7e332cca",
"bebba6e7a61461b8",
"96ebe81b6e20112e"
],
"x": 74,
"y": 1559,
"w": 712,
"h": 202
},
{
"id": "98e38052d1cc2f9b",
"type": "group",
"z": "eff21041cc941fef",
"name": "Room Scenes",
"style": {
"stroke": "#6f2fa0",
"fill": "#9363b7",
"label": true
},
"nodes": [
"d95d9964546768a5",
"bdab41af28f2c7cd",
"7c224927d50a5f97",
"e689231430e9c829",
"d790134891fedfcc",
"5a81041c4a1390b8",
"b19f4a996fd4c2ee",
"85e820743550308b"
],
"x": 14,
"y": 19,
"w": 742,
"h": 322
},
{
"id": "fd15bf62ba5e5171",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Room Scenes",
"style": {
"stroke": "#6f2fa0",
"fill": "#9363b7",
"label": true
},
"nodes": [
"879ee8903841b8f0",
"bc2426cfcd5afbe8",
"a5498446c1edffa9",
"f28e7fd88f75041e",
"e1123236ee16fdaf",
"a17d58585048335d",
"fba69dfc80829db7"
],
"x": 14,
"y": 19,
"w": 632,
"h": 322
},
{
"id": "c1e37f193ee65d73",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Auto Shower Mode",
"style": {
"stroke": "#ffC000",
"fill": "#ffcf3f",
"label": true
},
"nodes": [
"b26bc471bcac2653",
"b51f19fa5b3d1587",
"646ac99f62432e22"
],
"x": 674,
"y": 19,
"w": 672,
"h": 82
},
{
"id": "a60d1c8190059645",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Room Scenes",
"style": {
"stroke": "#6f2fa0",
"fill": "#9363b7",
"label": true
},
"nodes": [
"07049ae77b6751c6",
"31c254f61982f19d"
],
"x": 14,
"y": 19,
"w": 512,
"h": 82
},
{
"id": "d00eb21154ac4160",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Furnace Room Auto Off",
"style": {
"stroke": "#ffC000",
"fill": "#ffcf3f",
"label": true
},
"nodes": [
"dd3608c864d7007b",
"5e31d6aacad206b8",
"18599ab162ab225b",
"e79ecc6c79946cc4",
"ab01d3d95c7ea717",
"8fa363e9e0c1b165"
],
"x": 634,
"y": 19,
"w": 792,
"h": 142
},
{
"id": "628bc6d9078cb924",
"type": "group",
"z": "b5717a86ce55bc29",
"name": "Porch Scenes",
"style": {
"stroke": "#6f2fa0",
"fill": "#9363b7",
"label": true
},
"nodes": [
"af64b56e28c93907",
"3747d0c21057f3a6"
],
"x": 54,
"y": 19,
"w": 472,
"h": 82
},
{
"id": "277dd697dbcfe9c7",
"type": "group",
"z": "b5717a86ce55bc29",
"name": "Storm Mode",
"style": {
"stroke": "#ff0000",
"fill": "#ff3f3f",
"label": true
},
"nodes": [
"d2709b4d48275a22",
"ef4722474ddd6df7",
"994d4b415cfc1726",
"68701ec04bbaacf0",
"2d4e34f55fca3d30",
"742fb59053708930",
"6d9c29e9ac683246",
"d6ef529ccde504ef",
"1bc2077d7cfb57ed",
"6073a1ffd782cbde",
"616e794707796e49",
"b6fa25d3e17bf7ac"
],
"x": 54,
"y": 419,
"w": 1272,
"h": 262
},
{
"id": "af295df6d8fdd3ad",
"type": "group",
"z": "72f99805df043603",
"name": "Emma Bedroom Climate Debugging",
"style": {
"stroke": "#ff0000",
"fill": "#3f93cf",
"label": true
},
"nodes": [
"7472fd892bcfc621",
"975328c94dcd31e7",
"22ddbddb684f7163",
"c40516c637bc1a7e",
"7593f77568c03db2",
"30679e01160e2e2e"
],
"x": 1134,
"y": 1319,
"w": 332,
"h": 382
},
{
"id": "fba69dfc80829db7",
"type": "junction",
"z": "5e238cbbe6d612c9",
"g": "fd15bf62ba5e5171",
"x": 320,
"y": 60,
"wires": [
[
"a17d58585048335d"
]
]
},
{
"id": "34e2055344eea8fe",
"type": "junction",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"x": 1080,
"y": 520,
"wires": [
[
"5e00ecbccbe51462"
]
]
},
{
"id": "6f4235c9d4f6a6ea",
"type": "junction",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"x": 340,
"y": 560,
"wires": [
[]
]
},
{
"id": "7d50b11bbf5de8fd",
"type": "junction",
"z": "72f99805df043603",
"g": "5802ea32c1de36e8",
"x": 400,
"y": 1780,
"wires": [
[]
]
},
{
"id": "9e87348d.9c1c48",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "",
"connectionDelay": false,
"cacheJson": false,
"heartbeat": false,
"heartbeatInterval": "",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": "at: ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "h23",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": true
},
{
"id": "fd29421fc00140a8",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.1.251",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "5",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "be975ce229701797",
"type": "alexa-remote-account",
"name": "",
"authMethod": "proxy",
"proxyOwnIp": "192.168.1.26",
"proxyPort": "3456",
"cookieFile": "/config/node-red/alexa_auth",
"refreshInterval": "3",
"alexaServiceHost": "pitangui.amazon.com",
"pushDispatchHost": "",
"amazonPage": "amazon.com",
"acceptLanguage": "en-US",
"onKeywordInLanguage": "on",
"userAgent": "",
"usePushConnection": "on",
"autoInit": "on",
"autoQueryActivityOnTrigger": "on"
},
{
"id": "f14ef3df2209e9a7",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Send Alexa Message",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Send Alexa Message"
},
{
"property": "icon",
"value": "mdi:bullhorn"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "ad5b1d9f1ea8fea1",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Good Morning",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Good Morning"
},
{
"property": "icon",
"value": "mdi:weather-sunset-up"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "a8da4d03a2922c42",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Weather Briefing",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Weather Briefing"
},
{
"property": "icon",
"value": "mdi:weather-cloudy"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "30f1658baee9378e",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Goodnight",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Goodnight"
},
{
"property": "icon",
"value": "mdi:weather-night"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "04976a7418728aa3",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Restart AppDaemon",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Restart AppDaemon"
},
{
"property": "icon",
"value": "mdi:restart"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "457914a2c9dc72c1",
"type": "google-home-conf",
"username": "tm24fan8"
},
{
"id": "fd929ec3bfbeef1a",
"type": "discord-token",
"name": "Nerd Overlord"
},
{
"id": "8860321096392e94",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Weather Briefing Google",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Weather Briefing Google"
},
{
"property": "icon",
"value": "mdi:weather-cloudy"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "998d8d67ec377dd3",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Daily Briefing",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Daily Briefing"
},
{
"property": "icon",
"value": "mdi:weather-sunset-up"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "9c84afc610ced7b6",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Daily Briefing Google",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Daily Briefing Google"
},
{
"property": "icon",
"value": "mdi:weather-sunset-up"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "738e7f8f2ac71049",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Sunset Lights Trigger",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Sunset Lights Trigger"
},
{
"property": "icon",
"value": "mdi:lightbulb-alert"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "be9ed28696adcdb0",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Master Bedroom Night Mode",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Night Mode"
},
{
"property": "icon",
"value": "mdi:lightbulb-night"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "59cb8692ed7accd1",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Master Bedroom Day Mode",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Day Mode"
},
{
"property": "icon",
"value": "mdi:sun"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "9c63750f16f845ea",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Master Bedroom Bedtime Mode",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Bedtime Mode"
},
{
"property": "icon",
"value": "mdi:bed"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "675dd216a61c575b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Send Report",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Send Report"
},
{
"property": "icon",
"value": "mdi:bug"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "fbc65f8185932b5f",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Kallen Timer Start",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Kallen Timer Start"
},
{
"property": "icon",
"value": "mdi:play"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "d3f8c4466cc1deeb",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Master Bedroom Fan Only",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Fan Only"
},
{
"property": "icon",
"value": "mdi:fan"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "d9da4bd707013bc5",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Kallen School Status",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Kallen School Status"
},
{
"property": "icon",
"value": "mdi:bus"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "2c222901ee192ba1",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Kallen School Status Google",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Kallen School Status Google"
},
{
"property": "icon",
"value": "mdi:bus"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "60eb53fb94cd64e4",
"type": "lifx-config",
"token": "c9c9ac0dbbfa906c8a5c6ea51af2857ed4f9631fa41053e67268eaf0b897f51d"
},
{
"id": "f040a57e80fda8ee",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Send Text Notification",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Send Text Notification"
},
{
"property": "icon",
"value": "mdi:message-alert"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "0df0d4b823c241ca",
"type": "ical-config",
"url": "webcal://p72-caldav.icloud.com/published/2/ODM5MDk5NTE5ODM5MDk5NR0HVUW-Vl-m45F7V86TDotlk2-IoVPJ7u9SJ4CgaxkUnwXfBv2X3Td4TIRw64EwIf2-usGEsd6zG21yi63A5PY",
"caldav": "",
"caltype": "ical",
"name": "Family Calendar",
"replacedates": false,
"usecache": false,
"username": "",
"password": "",
"calendar": "",
"pastWeeks": "0",
"futureWeeks": "4"
},
{
"id": "527f99f7a7aa36c2",
"type": "ha-device-config",
"name": "Tina Work Tomorrow",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "781adad6153d9661",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "527f99f7a7aa36c2",
"name": "Tina Work Tomorrow",
"version": "6",
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Tina Work Tomorrow"
},
{
"property": "icon",
"value": "mdi:calendar"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false
},
{
"id": "415bf4eba63b9a50",
"type": "ha-device-config",
"name": "Cleanup",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "23e5e32354cf867a",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Basement On Manual",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Basement On Manual"
},
{
"property": "icon",
"value": "hue:room-stairs"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "e27ae85e2a296e7c",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Early Night Mode",
"version": "6",
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Early Night Mode"
},
{
"property": "icon",
"value": "mdi:lightbulb-night-outline"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "503ba5fd53d97d51",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Kallen Activities",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Kallen Activities"
},
{
"property": "icon",
"value": "mdi:timer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "a26fa856149e18bd",
"type": "ha-device-config",
"name": "Last Alexa Sensors",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "4118a859da3ae01f",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "a26fa856149e18bd",
"name": "Last Alexa Name",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Last Alexa Name"
},
{
"property": "icon",
"value": "mdi:volume-high"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "790a5433342e7eb5",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "a26fa856149e18bd",
"name": "Last Alexa Serial",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Last Alexa Serial"
},
{
"property": "icon",
"value": "mdi:volume-high"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "4d3001dabc174efe",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "a26fa856149e18bd",
"name": "Last Alexa Entity ID",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Last Alexa Entity ID"
},
{
"property": "icon",
"value": "mdi:volume-high"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "d7208904f97a76d6",
"type": "ha-device-config",
"name": "Tina Work",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "3577b1d6ba521c18",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "d7208904f97a76d6",
"name": "Tina Work Start Zone",
"version": "6",
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Tina Work Start Zone"
},
{
"property": "icon",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "e5f345a03a1ef184",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "d7208904f97a76d6",
"name": "Tina Work End Zone",
"version": "6",
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Tina Work End Zone"
},
{
"property": "icon",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "81cb9d95d14a3e5a",
"type": "add-todoist-api-token",
"name": "Tony"
},
{
"id": "1f10335891b41077",
"type": "ha-device-config",
"name": "Nerdhome Sports",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "95180a63dc83b944",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1f10335891b41077",
"name": "Active Sporting Event",
"version": "6",
"entityType": "select",
"haConfig": [
{
"property": "name",
"value": "Active Sporting Event"
},
{
"property": "icon",
"value": "mdi:baseball-bat"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "options",
"value": [
"Michigan Wolverines",
"Ohio State Buckeyes",
"Toledo Rockets",
"Minnesota Vikings",
"San Francisco 49ers",
"Cleveland Guardians",
"Minnesota Twins",
"Los Angeles Dodgers"
]
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "dc557449c40eba5e",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1f10335891b41077",
"name": "Watching Sports",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Watching Sports"
},
{
"property": "icon",
"value": "mdi:baseball-bat"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "c7a23a2b967375ec",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1f10335891b41077",
"name": "Team Score",
"version": "6",
"entityType": "number",
"haConfig": [
{
"property": "name",
"value": "Team Score"
},
{
"property": "icon",
"value": "mdi:counter"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "points"
},
{
"property": "min_value",
"value": 0
},
{
"property": "max_value",
"value": 150
},
{
"property": "step_value",
"value": 1
},
{
"property": "mode",
"value": "box"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "f64cc18b786d7352",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1f10335891b41077",
"name": "Opponent Score",
"version": "6",
"entityType": "number",
"haConfig": [
{
"property": "name",
"value": "Opponent Score"
},
{
"property": "icon",
"value": "mdi:counter"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "points"
},
{
"property": "min_value",
"value": 0
},
{
"property": "max_value",
"value": 150
},
{
"property": "step_value",
"value": 1
},
{
"property": "mode",
"value": "box"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "77c0d6f8dd47a65b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Master Bedroom Climate Reset",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Climate Reset"
},
{
"property": "icon",
"value": "mdi:backup-restore"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "39198b07403764b1",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1f10335891b41077",
"name": "Sports Room",
"version": "6",
"entityType": "select",
"haConfig": [
{
"property": "name",
"value": "Sports Room"
},
{
"property": "icon",
"value": "mdi:baseball-bat"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "options",
"value": [
"Living Room",
"Basement Studio",
"Both"
]
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "aebd1e9ea95e45da",
"type": "ha-device-config",
"name": "Laundry Tracking",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "5627513f9469cbb8",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "aebd1e9ea95e45da",
"name": "Washer Start",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Washer Start"
},
{
"property": "icon",
"value": "mdi:washing-machine"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "d2d7710df0394f16",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "aebd1e9ea95e45da",
"name": "Dryer Start",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Dryer Start"
},
{
"property": "icon",
"value": "mdi:tumble-dryer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "52dccff6d2c39667",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "aebd1e9ea95e45da",
"name": "Washer Cancel",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Washer Cancel"
},
{
"property": "icon",
"value": "mdi:washing-machine-off"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "9da998d5f74df33c",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "aebd1e9ea95e45da",
"name": "Dryer Cancel",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Dryer Cancel"
},
{
"property": "icon",
"value": "mdi:tumble-dryer-off"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "7d2b67c31769ed69",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Doorbell Rings",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Node Red Doorbell Alert"
},
{
"property": "icon",
"value": "mdi:doorbell-video"
}
],
"resend": false
},
{
"id": "8e399b2a287a0905",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Master Bedroom Cooling",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Cooling Schedule"
},
{
"property": "icon",
"value": ""
}
],
"resend": false
},
{
"id": "314752dbc6fd170d",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Master Bedroom Fan",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Fan Schedule"
},
{
"property": "icon",
"value": ""
}
],
"resend": false
},
{
"id": "d7261338e6b907f1",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Master Bedroom Wakeup",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Wakeup Schedule"
},
{
"property": "icon",
"value": ""
}
],
"resend": false
},
{
"id": "d5784e5baa80a105",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Kallen Bedtime",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Kallen Bedtime Schedule"
},
{
"property": "icon",
"value": ""
}
],
"resend": false
},
{
"id": "9e1418c3e9595312",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Kallen Wakeup",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Kallen Wakeup Schedule"
},
{
"property": "icon",
"value": ""
}
],
"resend": false
},
{
"id": "308fce46bd959bce",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Kallen Fan Time",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Kallen Fan Schedule"
},
{
"property": "icon",
"value": ""
}
],
"resend": false
},
{
"id": "7cc6440f2cdd8a6b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Lightning Warning",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Node Red Lightning Warning"
},
{
"property": "icon",
"value": "mdi:lightning-bolt"
}
],
"resend": false
},
{
"id": "77ba0ad52b2a9e2e",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "exposed as for Overwolf Events Dump",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Overwolf Events Dump"
},
{
"property": "icon",
"value": "mdi:test-tube"
}
],
"resend": false
},
{
"id": "21461835f9233213",
"type": "ha-device-config",
"name": "Mosquitto Stats",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "b78174a1b561ea3f",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Received 1min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Received 1min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "acbe15cbb8457f35",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Received 5min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Received 5min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "e023cc05d1c0cecb",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Received 15min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Received 15min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "7f5c52481ee5041b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Sent 1min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Sent 1min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "b1afb202ae5b94cf",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Sent 5min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Sent 5min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "608fb2f833106a54",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Sent 15min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Sent 15min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "3a3de00eeef75917",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Dropped 1min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Dropped 1min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "01b4bc2b7f492cac",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Dropped 5min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Dropped 5min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "58b262f448b7831a",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Dropped 15min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Dropped 15min"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "63b391b64c920d72",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Uptime",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Uptime"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "seconds"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "06c585be926ee13b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Messages Received",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Messages Received"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "20642905379cffe9",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Messages Sent",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Messages Sent"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "3e54ec9fa6f987bc",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "21461835f9233213",
"name": "Mosquitto Messages Stored",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Mosquitto Messages Stored"
},
{
"property": "icon",
"value": "mdi:database"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "messages"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "2bdf556c5a30e5d5",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Downstairs Bathroom Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Downstairs Bathroom Motion Lighting"
},
{
"property": "icon",
"value": "mdi:motion-sensor"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "e86f48a9dd99dd2b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Stairwell Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Stairwell Motion Lighting"
},
{
"property": "icon",
"value": "mdi:motion-sensor"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "f3f1bf31d66d2f88",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Emma Bedroom Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Motion Lighting"
},
{
"property": "icon",
"value": "mdi:motion-sensor"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "4a9187b8b68e4181",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Living Room Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Living Room Motion Lighting"
},
{
"property": "icon",
"value": "mdi:motion-sensor"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "8a6ada44f455b396",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Going Upstairs",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Going Upstairs"
},
{
"property": "icon",
"value": "hue:room-stairs"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "c5511d32d6044b83",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Mud Room Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Mud Room Motion Lighting"
},
{
"property": "icon",
"value": "mdi:motion-sensor"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "5053909a498e0d02",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Kallen Bedroom Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Kallen Bedroom Motion Lighting"
},
{
"property": "icon",
"value": "mdi:motion-sensor"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "9a5af08b3c421d41",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Master Bedroom Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Master Bedroom Motion Lighting"
},
{
"property": "icon",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "b721c7240c08272f",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Upstairs Bathroom Motion Lighting",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Upstairs Bathroom Motion Lighting"
},
{
"property": "icon",
"value": "mdi:motion-sensor"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "48a08ecc20e474e9",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Auto Shower Mode",
"version": "6",
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Auto Shower Mode"
},
{
"property": "icon",
"value": "mdi:shower"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "a11aaf0288452997",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "415bf4eba63b9a50",
"name": "Cleanup",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Cleanup"
},
{
"property": "icon",
"value": "mdi:broom"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false
},
{
"id": "61d19879e4bd1c55",
"type": "ha-device-config",
"name": "Defiance Weather Alerts",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "d8ea9407aa2cf6a5",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "61d19879e4bd1c55",
"name": "Severe Thunderstorm Warning",
"version": 6,
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Severe Thunderstorm Warning"
},
{
"property": "icon",
"value": "mdi:weather-lightning"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": "safety"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "4eaaca1b829b7144",
"type": "ha-device-config",
"name": "National Weather Alerts",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "3983b0de296263e9",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "4eaaca1b829b7144",
"name": "National Severe Thunderstorm Warnings",
"version": 6,
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "National Severe Thunderstorm Warnings"
},
{
"property": "icon",
"value": "mdi:weather-lightning"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "warnings"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "450c0778c403dffc",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "4eaaca1b829b7144",
"name": "National Tornado Warnings",
"version": 6,
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "National Tornado Warnings"
},
{
"property": "icon",
"value": "mdi:weather-tornado"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "warnings"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "294b242ba5cfb3fb",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "61d19879e4bd1c55",
"name": "Tornado Warning",
"version": 6,
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Tornado Warning"
},
{
"property": "icon",
"value": "mdi:weather-tornado"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": "safety"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "920ee00b5ff0ba8b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "61d19879e4bd1c55",
"name": "Tornado Watch",
"version": 6,
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Tornado Watch"
},
{
"property": "icon",
"value": "mdi:weather-tornado"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": "safety"
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "e7ae774638e7cc11",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "61d19879e4bd1c55",
"name": "Severe Thunderstorm Watch",
"version": 6,
"entityType": "binary_sensor",
"haConfig": [
{
"property": "name",
"value": "Severe Thunderstorm Watch"
},
{
"property": "icon",
"value": "mdi:weather-lightning"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "9643a7993e266372",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Emma Door Alert",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Emma Door Alert"
},
{
"property": "icon",
"value": "mdi:door"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "7d7c641acaff9284",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Emma Door Alert Cancel",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Emma Door Alert Cancel"
},
{
"property": "icon",
"value": "mdi:cancel"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "47b0f8d963c82cce",
"type": "ha-device-config",
"name": "Emma Bedroom Climate",
"hwVersion": "",
"manufacturer": "Node-RED",
"model": "",
"swVersion": ""
},
{
"id": "6bbeae1a731c6fa2",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Bedtime Mode",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Bedtime Mode"
},
{
"property": "icon",
"value": "mdi:bed"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "a7edd9c339d922b1",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Cooling Schedule",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Cooling Schedule"
},
{
"property": "icon",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "a41edb9d72f72766",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Wakeup",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Wakeup Schedule"
},
{
"property": "icon",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "774a5097399e1169",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Night Mode",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Night Mode"
},
{
"property": "icon",
"value": "mdi:lightbulb-night"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "46dadc28a60d6dd8",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Day Mode",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Day Mode"
},
{
"property": "icon",
"value": "mdi:sun"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "41b47b5dcb51a9c7",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Climate Reset",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Climate Reset"
},
{
"property": "icon",
"value": "mdi:backup-restore"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "0295918c27c0b70b",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Fan Only",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Fan Only"
},
{
"property": "icon",
"value": "mdi:fan"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "3ce4b28fb7c060b0",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "47b0f8d963c82cce",
"name": "Emma Bedroom Climate Watchdog",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Emma Bedroom Climate Watchdog"
},
{
"property": "icon",
"value": "mdi:lock-check"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "8371db473f46baf2",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Front Porch Storm Mode",
"version": 6,
"entityType": "switch",
"haConfig": [
{
"property": "name",
"value": "Front Porch Storm Mode"
},
{
"property": "icon",
"value": "mdi:lightning-bolt"
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "afead614fabc01bb",
"type": "function",
"z": "a42343e035e3313c",
"name": "",
"func": "const alexa = global.get('lastAlexaSerial')\nlet statusMsg = {\n \"payload\": alexa\n}\n\nmsg.where = alexa\n\nreturn[msg,statusMsg]",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 80,
"wires": [
[],
[]
]
},
{
"id": "1102574d15bdad4c",
"type": "delay",
"z": "a42343e035e3313c",
"name": "",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 180,
"y": 80,
"wires": [
[
"afead614fabc01bb"
]
]
},
{
"id": "388878f6056fa3e4",
"type": "function",
"z": "4107976aa434eb03",
"name": "Conversions",
"func": "msg.data.main.temp = ((msg.data.main.temp - 273.15) * 1.8) + 32\nmsg.data.main.feels_like = ((msg.data.main.feels_like - 273.15) * 1.8) + 32\nmsg.data.main.temp_min = ((msg.data.main.temp_min - 273.15) * 1.8) + 32\nmsg.data.main.temp_max = ((msg.data.main.temp_max - 273.15) * 1.8) + 32\nmsg.data.main.pressure = msg.data.main.pressure * 0.029529983071445\nmsg.data.wind.speed = msg.data.wind.speed * 2.237\nmsg.data.wind.gust = msg.data.wind.gust * 2.237\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 190,
"y": 80,
"wires": [
[
"80ce4b42b82e3c78"
]
]
},
{
"id": "80ce4b42b82e3c78",
"type": "function",
"z": "4107976aa434eb03",
"name": "Rounding",
"func": "const temp = msg.data.main.temp\nconst feels_like = msg.data.main.feels_like\nconst temp_min = msg.data.main.temp_min\nconst temp_max = msg.data.main.temp_max\nconst pressure = msg.data.main.pressure\nconst windspeed = msg.data.wind.speed\nconst windgust = msg.data.wind.gust\n\nmsg.data.main.temp = +temp.toFixed(1)\nmsg.data.main.feels_like = +feels_like.toFixed(1)\nmsg.data.main.temp_min = +temp_min.toFixed(1)\nmsg.data.main.temp_max = +temp_max.toFixed(1)\nmsg.data.main.pressure = +pressure.toFixed(2)\nmsg.data.wind.speed = +windspeed.toFixed(2)\nmsg.data.wind.gust = +windgust.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 80,
"wires": [
[]
]
},
{
"id": "98bf66889d4287db",
"type": "api-call-service",
"z": "6429099c4571dd6b",
"name": "Speech Engine",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.speech_engine",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"who\": topic,\t \"message\": payload,\t \"voice\": voice,\t \"type\": type\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "speech_engine",
"x": 420,
"y": 160,
"wires": [
[]
]
},
{
"id": "cee17a2c2fbb48ee",
"type": "function",
"z": "6429099c4571dd6b",
"name": "Processing",
"func": "const livingRoom = [\"Living Room\", \"Living Room Echo Dot\"]\nconst basementAlexa = [\"Basement\", \"Basement Echo Dot\"]\nconst basementGoogle = [\"Basement Google\", \"basement_google\"]\nconst kallenBedroom = [\"Kallen Bedroom\", \"Kallen Bedroom Speaker\"]\nconst emmaBedroom = [\"Emma Bedroom\", \"Emma Bedroom Speaker\"]\nconst kidsBedrooms = [\"Kids Bedrooms\"]\nconst allBedrooms = [\"All Bedrooms\"]\nconst masterBedroom = [\"Master Bedroom\", \"Master Bedroom Echo Dot\"]\nconst commonAreas = [\"Common Areas\"]\nconst alexaEverywhere = [\"alexa_everywhere\", \"Alexa Everywhere\"]\nconst room = msg.topic\nconst voice = msg.voice || global.get(\"jarvis_voice\", \"diskCon\")\nconst type = msg.type || \"normal\"\n\nif (livingRoom.includes(room)) {\n msg.topic = \"living_room\"\n} else if (basementAlexa.includes(room)) {\n msg.topic = \"basement\"\n} else if (basementGoogle.includes(room)) {\n msg.topic = \"basement_google\"\n} else if (kallenBedroom.includes(room)) {\n msg.topic = \"kallen_bedroom\"\n} else if (emmaBedroom.includes(room)) {\n msg.topic = \"emma_bedroom\"\n} else if (kidsBedrooms.includes(room)) {\n msg.topic = \"kids_bedrooms\"\n} else if (allBedrooms.includes(room)) {\n msg.topic = \"all_bedrooms\"\n} else if (masterBedroom.includes(room)) {\n msg.topic = \"master_bedroom\"\n} else if (commonAreas.includes(room)) {\n msg.topic = \"common\"\n} else if (alexaEverywhere.includes(room)) {\n msg.topic = \"alexa_everywhere\"\n} else if (room === \"Everywhere\") {\n msg.topic = \"everywhere\"\n}\n\nmsg.voice = voice\nmsg.type = type\n\nlet statusMsg = {\n \"status\": {\n \"fill\": \"green\",\n \"shape\": \"dot\",\n \"text\": `${msg.voice} speaking in ${room}`\n }\n}\n\nnode.send([msg,statusMsg])",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 230,
"y": 160,
"wires": [
[
"98bf66889d4287db"
],
[]
]
},
{
"id": "cee2f20718ddb03a",
"type": "function",
"z": "a062d9e6d44506dc",
"name": "Format",
"func": "const tpc = msg.topic\nconst pld = msg.payload\nlet dest = tpc.replaceAll(\"_\",\" \")\nlet scene = pld.replaceAll(\"_\",\" \")\n\nmsg.topic = dest\nmsg.payload = scene\n\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 160,
"y": 40,
"wires": [
[
"78a60e2da212f6aa"
]
]
},
{
"id": "78a60e2da212f6aa",
"type": "api-call-service",
"z": "a062d9e6d44506dc",
"name": "Hue Activate Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "hue.hue_activate_scene",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"group_name\": topic,\t \"scene_name\": payload,\t \"dynamic\": \"true\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "hue",
"service": "hue_activate_scene",
"x": 370,
"y": 40,
"wires": [
[]
]
},
{
"id": "0515d266dc983793",
"type": "api-call-service",
"z": "582b8363c9f33bf8",
"name": "Record Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_text.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.{{topic}}_selected_scene"
],
"labelId": [],
"data": "{\t \"value\": payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_text",
"service": "set_value",
"x": 340,
"y": 40,
"wires": [
[
"2fc6ea08f8f366b6"
]
]
},
{
"id": "2fc6ea08f8f366b6",
"type": "api-call-service",
"z": "582b8363c9f33bf8",
"name": "Reset Dropdown",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_first",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.{{topic}}_scenes"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_first",
"x": 550,
"y": 40,
"wires": [
[]
]
},
{
"id": "f1c11209a9226be9",
"type": "function",
"z": "582b8363c9f33bf8",
"name": "",
"func": "const pld = msg.payload\nconst tpc = msg.topic\nlet scene = pld.replaceAll(\"_\",\" \")\n\nglobal.set(`activeScene.${tpc}`, scene, \"diskCon\")\n\nmsg.payload = scene\n\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 160,
"y": 40,
"wires": [
[
"0515d266dc983793"
]
]
},
{
"id": "694ce0e1.4bee58",
"type": "function",
"z": "7cc13ada.b6712c",
"name": "is in range?",
"func": "const schedule = flow.get(\"schedule\");\nlet start = env.get(\"start\");\nlet stop = env.get(\"stop\");\nlet days = env.get(\"days\");\nif(schedule !== undefined){\n start = schedule.start;\n stop = schedule.stop;\n days = schedule.days;\n}\nconst time = new Date();\nlet day = time.getDay();\nif(day === 0) day = 7;\nlet hour = String(time.getHours());\nlet minute = String(time.getMinutes());\nif(hour.length == 1) hour = \"0\" + hour;\nif(minute.length == 1) minute = \"0\" + minute;\nconst hmtime = hour + \":\" + minute;\nif(days.includes(day)){\n if(start == stop){\n return [msg, null];\n } else if(start > stop){\n if(hmtime >= start || hmtime < stop){\n return [msg, null];\n } else {\n return [null, msg];\n }\n } else if(hmtime >= start && hmtime < stop){\n return [msg, null];\n } else {\n return [null, msg];\n }\n} else {\n return null;\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 100,
"wires": [
[],
[]
]
},
{
"id": "94dc9c00.0f576",
"type": "inject",
"z": "7cc13ada.b6712c",
"name": "",
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 170,
"y": 200,
"wires": [
[
"1bc56c04.ca0a3c"
]
]
},
{
"id": "1bc56c04.ca0a3c",
"type": "function",
"z": "7cc13ada.b6712c",
"name": "display rule",
"func": "const schedule = flow.get(\"schedule\");\nif(typeof schedule == \"object\"){\n const start = schedule.start;\n const stop = schedule.stop;\n const days = String(schedule.days).replace(/1/g,\"Mo\").replace(/2/g,\"Tu\").replace(/3/g,\"We\").replace(/4/g,\"Th\").replace(/5/g,\"Fr\").replace(/6/g,\"Sa\").replace(/7/g,\"Su\");\n msg.payload = \"override: \" + start + \"-\" + stop + \"/\" + days;\n} else {\n const start = env.get(\"start\");\n const stop = env.get(\"stop\");\n const days = String(env.get(\"days\")).replace(/1/g,\"Mo\").replace(/2/g,\"Tu\").replace(/3/g,\"We\").replace(/4/g,\"Th\").replace(/5/g,\"Fr\").replace(/6/g,\"Sa\").replace(/7/g,\"Su\");\n const override = false;\n msg.payload = start + \"-\" + stop + \"/\" + days;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 200,
"wires": [
[]
]
},
{
"id": "da7f7d3f.da5af",
"type": "function",
"z": "7cc13ada.b6712c",
"name": "check for override",
"func": "if(msg.topic == \"override\"){\n flow.set(\"schedule\",msg.payload);\n return [null, msg];\n} else if (msg.payload == \"reset\"){\n let reset;\n flow.set(\"schedule\",reset);\n return [null, msg];\n} else {\n return [msg, null];\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 250,
"y": 100,
"wires": [
[
"694ce0e1.4bee58"
],
[
"1bc56c04.ca0a3c"
]
]
},
{
"id": "942a915b6599fb27",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "scene.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"scene.{{topic}}_{{payload}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "scene",
"service": "turn_on",
"x": 930,
"y": 460,
"wires": [
[]
]
},
{
"id": "a89c7e8905a07998",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Reset",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.{{topic}}_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 550,
"y": 360,
"wires": [
[]
]
},
{
"id": "8c4d4fe614a52d4f",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Apply Adaptive Lighting",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "adaptive_lighting.apply",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"entity_id\": adaptive,\t \"adapt_brightness\" : brightness,\t \"adapt_color\" : color\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "adaptive_lighting",
"service": "apply",
"x": 1530,
"y": 280,
"wires": [
[]
]
},
{
"id": "c19b4dccc5d6a9af",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Nightlight Set",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "switch.turn_{{nightlight}}",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "switch",
"service": "turn_{{nightlight}}",
"x": 750,
"y": 460,
"wires": [
[
"942a915b6599fb27"
]
]
},
{
"id": "3a4f567b17b2214e",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Nightlight Off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "switch.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "switch",
"service": "turn_off",
"x": 930,
"y": 280,
"wires": [
[
"f41c0229b9fdcea4"
]
]
},
{
"id": "f41c0229b9fdcea4",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Turn Lights On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.{{topic}}_lights"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 1120,
"y": 280,
"wires": [
[
"970f719de254a1e7"
]
]
},
{
"id": "970f719de254a1e7",
"type": "delay",
"z": "a4ee891237e460a2",
"name": "",
"pauseType": "delay",
"timeout": "500",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1310,
"y": 280,
"wires": [
[
"8c4d4fe614a52d4f"
]
]
},
{
"id": "97400c5ff0842570",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Adaptive Lighting On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "switch.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"{{adaptive}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "switch",
"service": "turn_on",
"x": 600,
"y": 160,
"wires": [
[]
]
},
{
"id": "dc0972a3964e6513",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Adaptive Lighting Off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "switch.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"{{adaptive}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "switch",
"service": "turn_off",
"x": 600,
"y": 520,
"wires": [
[]
]
},
{
"id": "defe84d113029e8e",
"type": "subflow:a062d9e6d44506dc",
"z": "a4ee891237e460a2",
"name": "",
"x": 980,
"y": 400,
"wires": [
[]
]
},
{
"id": "72c0b7fda242bb67",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Dynamic Off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.{{topic}}_dynamic_scenes"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 750,
"y": 220,
"wires": [
[
"3a4f567b17b2214e"
]
]
},
{
"id": "a81fd188d89faa25",
"type": "subflow:582b8363c9f33bf8",
"z": "a4ee891237e460a2",
"name": "",
"x": 570,
"y": 580,
"wires": []
},
{
"id": "de5a484b79c5d0e4",
"type": "subflow:582b8363c9f33bf8",
"z": "a4ee891237e460a2",
"name": "",
"x": 570,
"y": 100,
"wires": []
},
{
"id": "60924f02885cc3c8",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Notify TV",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.tv_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"who\": dest,\t \"title\": topic,\t \"message\": payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"25%\",\t \"color\": \"red\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "tv_notify",
"x": 920,
"y": 340,
"wires": [
[]
]
},
{
"id": "ca51f6e6bd51fb55",
"type": "function",
"z": "a4ee891237e460a2",
"name": "Routing",
"func": "const str = msg.payload\nconst newPayload = str.replaceAll(\" \",\"_\")\nconst topic = msg.topic\n\nmsg.payload = newPayload\nmsg.adaptive = \"switch.adaptive_lighting_\" + topic\n\nif (newPayload === 'Select') {\n return null\n} else if (newPayload === 'Adaptive') {\n return[msg,null,null]\n} else if (newPayload === 'Reset') {\n return[null,msg,null]\n} else {\n return[null,null,msg]\n}",
"outputs": 3,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 360,
"wires": [
[
"de5a484b79c5d0e4",
"9af9a2966a477b33",
"97400c5ff0842570"
],
[
"a89c7e8905a07998"
],
[
"a81fd188d89faa25",
"dc0972a3964e6513",
"4ab49b8485f1886f"
]
],
"outputLabels": [
"Adaptive",
"Reset",
"Otherwise"
],
"icon": "node-red/switch.svg"
},
{
"id": "9af9a2966a477b33",
"type": "function",
"z": "a4ee891237e460a2",
"name": "Routing",
"func": "const str = msg.payload\nconst scene = str.replaceAll(\"_\", \" \")\nconst dynamicRooms = global.get(\"dynamicRooms\", \"diskCon\")\nconst tvRooms = global.get(\"tvRooms\", \"diskCon\")\nconst room = msg.topic\n\nlet notify = {\n \"dest\": room,\n \"topic\": \"Lights Changed\",\n \"payload\": `Lights changed to a new scene: ${scene}`\n}\n\nlet statusMsg = {\n \"status\": {\n \"fill\": \"green\",\n \"shape\": \"dot\",\n \"text\": `Lights changed to a new scene: ${scene}`\n }\n}\n\nif (dynamicRooms.includes(room)) {\n node.send([msg,null,null,null])\n} else {\n node.send([null,msg,null,null])\n}\n\nif (tvRooms.includes(room)) {\n node.send([null,null,notify,null])\n}\n\nnode.send([null,null,null,statusMsg])",
"outputs": 4,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 560,
"y": 280,
"wires": [
[
"72c0b7fda242bb67"
],
[
"3a4f567b17b2214e"
],
[
"60924f02885cc3c8"
],
[]
],
"outputLabels": [
"Dynamic",
"Else",
"",
""
]
},
{
"id": "4ab49b8485f1886f",
"type": "function",
"z": "a4ee891237e460a2",
"name": "Routing",
"func": "const str = msg.payload\nconst scene = str.replaceAll(\"_\", \" \")\nconst states = global.get('homeassistant.homeAssistant.states')\nconst dynamicRooms = global.get(\"dynamicRooms\", \"diskCon\")\nconst tvRooms = global.get(\"tvRooms\", \"diskCon\")\nconst room = msg.topic\n\nlet notify = {\n \"dest\": room,\n \"topic\": \"Lights Changed\",\n \"payload\": `Lights changed to a new scene: ${scene}`\n}\n\nlet statusMsg = {\n \"status\": {\n \"fill\": \"green\",\n \"shape\": \"dot\",\n \"text\": `Lights changed to a new scene: ${scene}`\n }\n}\n\nif (scene.includes(\"Nightlight\")) {\n msg.nightlight = \"on\"\n} else {\n msg.nightlight = \"off\"\n}\n\nif (dynamicRooms.includes(room)) {\n let inputBoolean = \"input_boolean.\" + room + \"_dynamic_scenes\"\n let boolState = states[inputBoolean].state\n if (boolState === 'on') {\n node.send([msg,null,null,null])\n } else {\n node.send([null,msg,null,null])\n }\n} else {\n node.send([null,msg,null,null])\n}\n\nif (tvRooms.includes(room)) {\n node.send([null,null,notify,null])\n}\n\nnode.send([null,null,null,statusMsg])",
"outputs": 4,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 560,
"y": 440,
"wires": [
[
"defe84d113029e8e"
],
[
"c19b4dccc5d6a9af"
],
[
"60924f02885cc3c8"
],
[]
],
"outputLabels": [
"Dynamic",
"Non-Dynamic",
"Notify",
""
]
},
{
"id": "6088f5b9f13e0e36",
"type": "delay",
"z": "05a2d9f89e72481f",
"name": "",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 200,
"y": 80,
"wires": [
[
"8e803251d3e3c3ae"
]
]
},
{
"id": "8e803251d3e3c3ae",
"type": "function",
"z": "05a2d9f89e72481f",
"name": "",
"func": "const alexa = global.get('lastAlexaName')\nlet statusMsg = {\n \"payload\": alexa\n}\n\nif (alexa === \"Basement Echo Dot\") {\n msg.who = \"basement\"\n} else if (alexa === \"Living Room Echo Dot\") {\n msg.who = \"living_room\"\n} else if (alexa === \"Master Bedroom Echo Dot\") {\n msg.who = \"master_bedroom\"\n}\n\nreturn[msg,statusMsg]",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 80,
"wires": [
[],
[]
]
},
{
"id": "54f4bebfc9414dbd",
"type": "lifx-list-scenes",
"z": "3aa2aec226246753",
"name": "",
"api": "60eb53fb94cd64e4",
"x": 210,
"y": 140,
"wires": [
[
"96da394eceab9244"
]
]
},
{
"id": "8b4af77e07c66df9",
"type": "lifx-list-lights",
"z": "3aa2aec226246753",
"name": "",
"api": "60eb53fb94cd64e4",
"selector": "",
"x": 200,
"y": 80,
"wires": [
[
"817c0a6afb11477b"
]
]
},
{
"id": "817c0a6afb11477b",
"type": "debug",
"z": "3aa2aec226246753",
"name": "lights",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 370,
"y": 80,
"wires": []
},
{
"id": "96da394eceab9244",
"type": "debug",
"z": "3aa2aec226246753",
"name": "scenes",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 380,
"y": 140,
"wires": []
},
{
"id": "8ad119b6c6e11ddd",
"type": "function",
"z": "85c4f81ca9628aea",
"name": "Format",
"func": "const str = msg.payload\nlet scene = str.replaceAll(\"_\",\" \")\nlet topic = msg.topic\n\nlet statusMsg = {\n \"status\": {\n \"fill\": \"green\",\n \"shape\": \"dot\",\n \"text\": `Lights changed to a new scene: ${scene}`\n }\n}\n\nif (scene === 'Reset' || scene === 'Select') {\n return null\n} else {\n node.send(statusMsg)\n}",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 840,
"y": 340,
"wires": [
[]
]
},
{
"id": "78a73c2d816658d8",
"type": "subflow:582b8363c9f33bf8",
"z": "85c4f81ca9628aea",
"name": "",
"x": 710,
"y": 420,
"wires": []
},
{
"id": "9cd0aa12d56438c6",
"type": "function",
"z": "85c4f81ca9628aea",
"name": "Routing",
"func": "const str = msg.payload\nconst newPayload = str.replaceAll(\" \",\"_\")\n\nmsg.payload = newPayload\n\nif (newPayload != 'Select' && newPayload != 'Reset') {\n return msg;\n} else {\n return null\n}",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 340,
"wires": [
[
"78a73c2d816658d8",
"138fc130a014b26e"
]
],
"outputLabels": [
"Adaptive"
]
},
{
"id": "138fc130a014b26e",
"type": "api-call-service",
"z": "85c4f81ca9628aea",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"script.{{payload}}_in_{{topic}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "turn_on",
"x": 670,
"y": 340,
"wires": [
[
"8ad119b6c6e11ddd"
]
]
},
{
"id": "b05ef328b90665d5",
"type": "delay",
"z": "b88bb63bb13eeb27",
"name": "",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 200,
"y": 80,
"wires": [
[
"c2a8a3f1f00bc4b7"
]
]
},
{
"id": "c2a8a3f1f00bc4b7",
"type": "function",
"z": "b88bb63bb13eeb27",
"name": "",
"func": "const alexa = global.get('lastAlexaEntityId')\nlet statusMsg = {\n \"payload\": alexa\n}\n\nmsg.who = alexa\n\nreturn[msg,statusMsg]",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 80,
"wires": [
[],
[]
]
},
{
"id": "d509e18fa07ab430",
"type": "color-convert",
"z": "17510314e84badd9",
"input": "hex",
"output": "rgb",
"outputType": "array",
"scaleInput": false,
"x": 350,
"y": 80,
"wires": [
[
"e0b30104939cf28d"
]
]
},
{
"id": "664a1a92c5c5546e",
"type": "split",
"z": "17510314e84badd9",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 190,
"y": 80,
"wires": [
[
"d509e18fa07ab430"
]
]
},
{
"id": "e0b30104939cf28d",
"type": "join",
"z": "17510314e84badd9",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 510,
"y": 80,
"wires": [
[
"52dd35473d9e536f"
]
]
},
{
"id": "52dd35473d9e536f",
"type": "function",
"z": "17510314e84badd9",
"name": "Set Contexts",
"func": "const topic = msg.topic\nconst payload = msg.payload\n\nif (topic === 'teamColors') {\n flow.set(\"$parent.teamColors\", payload, \"diskCon\")\n} else if (topic === 'oppColors') {\n flow.set(\"$parent.oppColors\", payload, \"diskCon\")\n}",
"outputs": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 690,
"y": 80,
"wires": []
},
{
"id": "8b3c203e7e901a8c",
"type": "moment",
"z": "384eaf2f63dcb5db",
"name": "",
"topic": "",
"input": "timestamp",
"inputType": "msg",
"inTz": "America/New_York",
"adjAmount": 0,
"adjType": "days",
"adjDir": "add",
"format": "YYYY-MM-DD HH:mm:00",
"locale": "en_us",
"output": "datetime",
"outputType": "msg",
"outTz": "America/New_York",
"x": 240,
"y": 80,
"wires": [
[]
]
},
{
"id": "b2d071ca42e4a3c6",
"type": "function",
"z": "9766d47584651edb",
"name": "Convert to seconds",
"func": "let duration = msg.duration\nlet seconds = duration * 60\n\nlet statusMsg = {\n \"payload\": seconds + \"s\"\n}\n\nmsg.duration = seconds\n\nnode.status({ fill: \"green\", shape: \"dot\", text: msg.duration + \"s\"});\n\nreturn[msg,statusMsg]",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 230,
"y": 80,
"wires": [
[],
[]
],
"outputLabels": [
"Output",
"Status"
],
"icon": "font-awesome/fa-clock-o"
},
{
"id": "11aabd786c07244f",
"type": "function",
"z": "ea629141206d5343",
"name": "user conversion",
"func": "// Get the user ID list from global context\nconst users = global.get(\"userIDList\", \"diskCon\") || {}\n\n// Initialize variables\nlet userTrigger = \"none\"\nlet statusTxt = \"\"\n\n// Extract user ID from the message\nif (msg.payload?.context?.user_id) {\n userTrigger = msg.payload.context.user_id\n} else if (msg.data?.context?.user_id) {\n userTrigger = msg.data.context.user_id\n}\n\n// Validate userTrigger and set status message\nif (userTrigger === \"none\" || !users[userTrigger]) {\n statusTxt = \"User not found\"\n node.error(`User ID '${userTrigger}' not found in user list.`)\n return null // Stop execution if user is not found\n} else {\n const user = users[userTrigger]\n statusTxt = `User: ${user.firstName}`\n msg.user = { ...user } // Avoid mutating the original msg\n}\n\n// Create the status message\nconst statusMsg = {\n status: {\n fill: \"green\",\n shape: \"dot\",\n text: `${statusTxt} at ${new Date().toLocaleString()}`\n }\n}\n\n// Send the message and status message to the output nodes\nnode.send([msg, statusMsg])",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 220,
"y": 80,
"wires": [
[],
[]
],
"icon": "font-awesome/fa-user"
},
{
"id": "7fc67fc156c0f4be",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_timer"
],
"labelId": [],
"data": "{ \"duration\": {{duration}}}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 790,
"y": 200,
"wires": [
[]
]
},
{
"id": "34dcb204b421710d",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Resume Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_timer"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 580,
"y": 440,
"wires": [
[
"e69ad4771494c458",
"93a52960301bb3a3"
]
]
},
{
"id": "923538ef97772f0c",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Notification",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"who\":\"kallen\",\t \"message\": payload,\t \"title\": topic,\t \"type\": \"normal\",\t \"tag\": \"kallen-timer-finished\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "text_notify",
"x": 950,
"y": 660,
"wires": [
[]
]
},
{
"id": "a3e3dc438a7b95fc",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Finished Message",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "You are done with activity for today!",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "activity Timer Complete",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 570,
"y": 660,
"wires": [
[
"08a22fa71fce5e91"
]
]
},
{
"id": "797d3e7cc53d773f",
"type": "ha-button",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Start Button",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "fbc65f8185932b5f",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "button",
"valueType": "str"
}
],
"x": 130,
"y": 300,
"wires": [
[
"1a0adfa82fff507a"
]
]
},
{
"id": "fe1ba086baf93ec0",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Reset Slider",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_number.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_number.kallen_activity_duration"
],
"labelId": [],
"data": "{\t \"value\":30\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_number",
"service": "set_value",
"x": 350,
"y": 820,
"wires": [
[]
]
},
{
"id": "50056b099a24a824",
"type": "subflow:6429099c4571dd6b",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "",
"x": 640,
"y": 600,
"wires": [
[]
]
},
{
"id": "d8e2d16e313b938a",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Task ID",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"id\":\"5631572291\"}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 575,
"y": 720,
"wires": [
[
"283661388275a459"
]
],
"l": false
},
{
"id": "e69ad4771494c458",
"type": "api-current-state",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Get Room",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_select.kallen_activity_room",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 770,
"y": 440,
"wires": [
[
"fdf9b6820eb7289a"
]
]
},
{
"id": "fdf9b6820eb7289a",
"type": "switch",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Routing",
"property": "room",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Kallen Bedroom",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 885,
"y": 440,
"wires": [
[
"24abb932c4cd0b1f"
],
[]
],
"l": false
},
{
"id": "5c44fd504453ae63",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Turn on K's bedroom lights",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [
"kallen_bedroom"
],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 1440,
"y": 400,
"wires": [
[
"dd0be4a0dd77e1db"
]
]
},
{
"id": "908543f7b78f7beb",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Turn on K's bedroom lights",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [
"kallen_bedroom"
],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 980,
"y": 80,
"wires": [
[
"d6728df5d1fdf67e"
]
]
},
{
"id": "dd0be4a0dd77e1db",
"type": "delay",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1605,
"y": 400,
"wires": [
[
"6b086807971b2618"
]
],
"l": false
},
{
"id": "d6728df5d1fdf67e",
"type": "delay",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1155,
"y": 80,
"wires": [
[
"ae7073e78053da5d"
]
],
"l": false
},
{
"id": "ae7073e78053da5d",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Set to Adaptive",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_bedroom_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 1300,
"y": 80,
"wires": [
[]
]
},
{
"id": "6b086807971b2618",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Set to Adaptive",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_bedroom_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 1740,
"y": 400,
"wires": [
[]
]
},
{
"id": "6736626753b33834",
"type": "api-current-state",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Check lights",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "light.kallen_bedroom_lights",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "lights",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1210,
"y": 440,
"wires": [
[
"5c44fd504453ae63"
],
[]
],
"outputLabels": [
"off",
"on"
]
},
{
"id": "b0c92a72557d0ac6",
"type": "switch",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "",
"property": "activity",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Reading",
"vt": "str"
},
{
"t": "eq",
"v": "Writing",
"vt": "str"
},
{
"t": "eq",
"v": "Trombone Practice",
"vt": "str"
},
{
"t": "eq",
"v": "Studying",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 495,
"y": 820,
"wires": [
[
"d8e2d16e313b938a"
],
[
"408795055634e897"
],
[
"d580c539c554a4c1"
],
[
"f0cc7b3b9622312a"
]
],
"l": false
},
{
"id": "408795055634e897",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Task ID",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"id\":\"5631620966\"}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 575,
"y": 780,
"wires": [
[
"283661388275a459"
]
],
"l": false
},
{
"id": "0a441953c41a18ae",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Formatting",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "activity",
"fromt": "str",
"to": "activity",
"tot": "msg"
},
{
"t": "set",
"p": "voice",
"pt": "msg",
"to": "Joanna",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 495,
"y": 600,
"wires": [
[
"50056b099a24a824"
]
],
"l": false
},
{
"id": "08a22fa71fce5e91",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Set Activity",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "activity",
"fromt": "str",
"to": "activity",
"tot": "msg"
},
{
"t": "change",
"p": "topic",
"pt": "msg",
"from": "activity",
"fromt": "str",
"to": "activity",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 660,
"wires": [
[
"923538ef97772f0c"
]
]
},
{
"id": "736d7433005436b3",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Formatting",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "activity timer has been started in room for duration minutes",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "room",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "activity",
"fromt": "str",
"to": "activity",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "room",
"fromt": "str",
"to": "room",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "duration",
"fromt": "str",
"to": "duration",
"tot": "msg"
},
{
"t": "set",
"p": "voice",
"pt": "msg",
"to": "Joanna",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 735,
"y": 260,
"wires": [
[
"0aa29248b560c45d"
]
],
"l": false
},
{
"id": "0aa29248b560c45d",
"type": "subflow:6429099c4571dd6b",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "",
"x": 860,
"y": 260,
"wires": [
[]
]
},
{
"id": "b8ca8a1a2655570b",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Rounding",
"func": "const readout = msg.duration\n\nmsg.duration = +readout.toFixed(0)\n\nnode.status({fill:\"green\",shape:\"dot\",text:msg.duration + \"m\"})\n\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 675,
"y": 260,
"wires": [
[
"736d7433005436b3"
]
],
"l": false
},
{
"id": "24abb932c4cd0b1f",
"type": "api-current-state",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Control Lights?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.kallen_timer_control_lights",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "lights",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1020,
"y": 440,
"wires": [
[
"6736626753b33834"
],
[]
],
"outputLabels": [
"on",
"off"
]
},
{
"id": "c0521b53f7efeb17",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Formatting",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "activity timer has been paused in room with remainingmin minutes and remainingsec seconds left",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "room",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "activity",
"fromt": "str",
"to": "activity",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "room",
"fromt": "str",
"to": "room",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "remainingmin",
"fromt": "str",
"to": "remainingmin",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "remainingsec",
"fromt": "str",
"to": "remainingsec",
"tot": "msg"
},
{
"t": "set",
"p": "voice",
"pt": "msg",
"to": "Joanna",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 885,
"y": 360,
"wires": [
[
"95d5ac486b4f9ee0"
]
],
"l": false
},
{
"id": "95d5ac486b4f9ee0",
"type": "subflow:6429099c4571dd6b",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "",
"x": 1020,
"y": 360,
"wires": [
[]
]
},
{
"id": "49767cbfa622a734",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Formatting",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "activity timer has been resumed in room with remainingmin minutes and remainingsec seconds remaining",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "room",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "activity",
"fromt": "str",
"to": "activity",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "room",
"fromt": "str",
"to": "room",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "remainingmin",
"fromt": "str",
"to": "remainingmin",
"tot": "msg"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "remainingsec",
"fromt": "str",
"to": "remainingsec",
"tot": "msg"
},
{
"t": "set",
"p": "voice",
"pt": "msg",
"to": "Joanna",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 885,
"y": 500,
"wires": [
[
"04113ab4977bf725"
]
],
"l": false
},
{
"id": "04113ab4977bf725",
"type": "subflow:6429099c4571dd6b",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "",
"x": 1020,
"y": 500,
"wires": [
[]
]
},
{
"id": "d580c539c554a4c1",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Task ID",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"id\":\"6222268062\"}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 575,
"y": 840,
"wires": [
[
"283661388275a459"
]
],
"l": false
},
{
"id": "f0cc7b3b9622312a",
"type": "change",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Task ID",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"id\":\"6351557015\"}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 575,
"y": 900,
"wires": [
[
"283661388275a459"
]
],
"l": false
},
{
"id": "206e512c5268020f",
"type": "server-events",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.kallen_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 140,
"y": 600,
"wires": [
[
"fe1ba086baf93ec0",
"4da18a3f1e0298db"
]
]
},
{
"id": "93a52960301bb3a3",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Announce",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst room = states['input_select.kallen_activity_room'].state\nconst activity = states['input_select.kallen_activities'].state\nconst minutes = states['sensor.kallen_timer_remaining_minutes'].state\nconst seconds = states['sensor.kallen_timer_remaining_seconds'].state\n\nmsg.room = room\nmsg.activity = activity\nmsg.remainingmin = minutes\nmsg.remainingsec = seconds\n\nnode.status({ fill: \"green\", shape: \"dot\", text: \"Sent\" })\n\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 760,
"y": 500,
"wires": [
[
"49767cbfa622a734"
]
],
"icon": "font-awesome/fa-volume-up"
},
{
"id": "0e39331337b021bb",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Start",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst room = states['input_select.kallen_activity_room'].state\nconst activity = states['input_select.kallen_activities'].state\nconst controlLights = states['input_boolean.kallen_timer_control_lights'].state\nconst duration = states['input_number.kallen_activity_duration'].state\nconst fixDuration = parseFloat(duration)\n\nmsg.room = room\nmsg.activity = activity\nmsg.lights = controlLights\nmsg.duration = fixDuration\n\nnode.status({fill:\"green\",shape:\"dot\",text:room})\n\nif (room === 'Basement') {\n return[msg,null,null]\n} else if (room === 'Kallen Bedroom') {\n return [null,msg,null]\n} else {\n return[null,null,msg]\n}",
"outputs": 3,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 160,
"wires": [
[
"b8ca8a1a2655570b",
"49dbe17ff03ed572",
"9612270d4cdfbf07"
],
[
"b8ca8a1a2655570b",
"49dbe17ff03ed572",
"9612270d4cdfbf07"
],
[
"b8ca8a1a2655570b",
"49dbe17ff03ed572",
"9612270d4cdfbf07"
]
],
"outputLabels": [
"Basement",
"Kallen Bedroom",
"Otherwise"
],
"icon": "font-awesome/fa-hourglass-start"
},
{
"id": "82172c8ab1a9c8e2",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Announce",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst room = states['input_select.kallen_activity_room'].state\nconst activity = states['input_select.kallen_activities'].state\nconst minutes = states['sensor.kallen_timer_remaining_minutes'].state\nconst seconds = states['sensor.kallen_timer_remaining_seconds'].state\n\nmsg.room = room\nmsg.activity = activity\nmsg.remainingmin = minutes\nmsg.remainingsec = seconds\n\nnode.status({fill:\"green\",shape:\"dot\",text:\"Sent\"})\n\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 560,
"y": 360,
"wires": [
[
"afeb1d238a623c3d"
]
],
"icon": "font-awesome/fa-volume-up"
},
{
"id": "afeb1d238a623c3d",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.pause",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_timer"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "pause",
"x": 790,
"y": 360,
"wires": [
[
"c0521b53f7efeb17"
]
]
},
{
"id": "4da18a3f1e0298db",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Announce",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst room = states['input_select.kallen_activity_room'].state\nconst activity = states['input_select.kallen_activities'].state\n\nmsg.topic = room\nmsg.activity = activity\nmsg.payload = 'activity timer completed, good job!'\n\nnode.status({ fill: \"green\", shape: \"dot\", text: \"Sent\" })\n\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 600,
"wires": [
[
"a3e3dc438a7b95fc",
"b0c92a72557d0ac6",
"0a441953c41a18ae"
]
],
"icon": "font-awesome/fa-volume-up"
},
{
"id": "49dbe17ff03ed572",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Lights?",
"func": "if (msg.lights === 'on') {\n if (msg.room === 'Kallen Bedroom') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Lights Controlled\"})\n return[msg,null]\n } else if (msg.room === 'Living Room') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Lights Controlled\"})\n return[null,msg]\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:`N/A in ${msg.room}`})\n return null\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Disabled\"})\n return null\n}",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 720,
"y": 120,
"wires": [
[
"908543f7b78f7beb"
],
[
"259da5d2e5a07c83"
]
],
"outputLabels": [
"Kallen Bedroom",
"Living Room"
],
"icon": "node-red-contrib-huemagic/hue-light.svg"
},
{
"id": "259da5d2e5a07c83",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"name": "Turn on Living Room lights",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_lights"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 980,
"y": 140,
"wires": [
[
"cd6fc2c497e8d571"
]
]
},
{
"id": "cd6fc2c497e8d571",
"type": "delay",
"z": "4a8821853d4dd1ad",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1155,
"y": 140,
"wires": [
[
"d6594de2b4194b54"
]
],
"l": false
},
{
"id": "d6594de2b4194b54",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"name": "Set to Adaptive",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.living_room_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 1300,
"y": 140,
"wires": [
[]
]
},
{
"id": "283661388275a459",
"type": "todoist-task-complete",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "",
"token": "81cb9d95d14a3e5a",
"x": 740,
"y": 820,
"wires": [
[]
]
},
{
"id": "9612270d4cdfbf07",
"type": "subflow:9766d47584651edb",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "",
"x": 675,
"y": 200,
"wires": [
[
"7fc67fc156c0f4be"
]
],
"l": false
},
{
"id": "1a0adfa82fff507a",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Processing",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst timer = states['timer.kallen_timer'].state\n\n// Basic replacement for current entry flow\n\nif (timer === 'idle') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Start\"})\n node.send([msg,null,null])\n} else if (timer === 'active') {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"Pause\"})\n node.send([null,msg,null])\n} else if (timer === 'paused') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Resume\"})\n node.send([null,null,msg])\n}",
"outputs": 3,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 300,
"wires": [
[
"0e39331337b021bb"
],
[
"82172c8ab1a9c8e2"
],
[
"34dcb204b421710d"
]
],
"outputLabels": [
"idle",
"active",
"paused"
]
},
{
"id": "27ae9c023ee2d1f6",
"type": "server-state-changed",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Duration Change",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_number.kallen_activity_duration"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "num",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
}
],
"x": 140,
"y": 80,
"wires": [
[
"88d088ea70f0030a"
]
]
},
{
"id": "88d088ea70f0030a",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Timer Math",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst oldState = msg.data.old_state.state\nconst newState = msg.data.new_state.state\nconst entity_id = msg.data.entity_id\nconst subtract = newState - oldState\nconst multiply = subtract * 60\nconst diff = parseInt(multiply)\nconst running = states[\"timer.kallen_timer\"].state\n\nlet changeMsg = {\n \"timer\": \"timer.kallen_timer\",\n \"change\": diff\n}\n\nif (running === 'active') {\n node.send(changeMsg)\n node.status({fill:\"green\",shape:\"dot\",text:\"Timer Changed\"})\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Blocked\"})\n}",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 80,
"wires": [
[
"86c7f29776a59797"
]
]
},
{
"id": "86c7f29776a59797",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Timer Change",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.timer_modify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"timer\": timer,\t \"change\": change\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "timer_modify",
"x": 520,
"y": 80,
"wires": [
[]
]
},
{
"id": "fd4bbf481e16e6ea",
"type": "sunrise",
"z": "e44b1e7a8ef7ae1d",
"name": "",
"lat": "41.286720",
"lon": "-84.362106",
"start": "sunriseEnd",
"end": "sunsetStart",
"soff": 0,
"eoff": "-60",
"x": 130,
"y": 180,
"wires": [
[
"15a73af2f8ea690c"
],
[
"dd3f147b2583a136"
]
]
},
{
"id": "bee1e4f9b480f6f6",
"type": "ha-button",
"z": "e44b1e7a8ef7ae1d",
"name": "Manual Trigger",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "738e7f8f2ac71049",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "0",
"valueType": "num"
},
{
"property": "topic",
"propertyType": "msg",
"value": "manual-trigger",
"valueType": "str"
}
],
"x": 120,
"y": 300,
"wires": [
[
"5ec63f0857df4164"
]
]
},
{
"id": "3d97e97025c63331",
"type": "ical-upcoming",
"z": "e44b1e7a8ef7ae1d",
"confignode": "0df0d4b823c241ca",
"timeout": "300",
"timeoutUnits": "seconds",
"cron": "",
"name": "",
"offsettype": "",
"offset": "",
"offsetUnitstype": "",
"offsetUnits": "",
"eventtypes": "events",
"eventtypestype": "eventtypes",
"calendar": "",
"calendartype": "str",
"triggertype": "trigger",
"trigger": "match",
"timezone": "America/New_York",
"timezonetype": "str",
"dateformat": "{\"timeStyle\":\"short\",\"dateStyle\":\"short\"}",
"dateformattype": "json",
"language": "en",
"languagetype": "language",
"filterProperty": "summary",
"filterPropertytype": "filterProperty",
"filterOperator": "between",
"filterOperatortype": "filterOperator",
"filtertype": "str",
"filter2type": "str",
"filter2": "",
"filter": "Work",
"checkall": false,
"endpreview": "",
"endpreviewUnits": "",
"previewtype": "num",
"preview": "",
"previewUnitstype": "previewUnits",
"previewUnits": "days",
"pastviewtype": "num",
"pastview": "",
"pastviewUnits": "days",
"pastviewUnitstype": "pastviewUnits",
"x": 150,
"y": 640,
"wires": [
[
"a605e8b865992be7"
]
]
},
{
"id": "798ff6ede18394ea",
"type": "ha-binary-sensor",
"z": "e44b1e7a8ef7ae1d",
"name": "Work Tomorrow",
"entityConfig": "781adad6153d9661",
"version": 0,
"state": "work_tomorrow",
"stateType": "msg",
"attributes": [
{
"property": "date",
"value": "payload.0.date",
"valueType": "msg"
},
{
"property": "eventStart",
"value": "payload.0.eventStart",
"valueType": "msg"
},
{
"property": "eventEnd",
"value": "payload.0.eventEnd",
"valueType": "msg"
},
{
"property": "summary",
"value": "payload.0.summary",
"valueType": "msg"
},
{
"property": "location",
"value": "payload.0.location",
"valueType": "msg"
},
{
"property": "isRecurring",
"value": "payload.0.isRecurring",
"valueType": "msg"
},
{
"property": "allDay",
"value": "payload.0.allDay",
"valueType": "msg"
},
{
"property": "calendarName",
"value": "payload.0.calendarName",
"valueType": "msg"
},
{
"property": "countdown",
"value": "payload.0.countdown",
"valueType": "msg"
},
{
"property": "start_timestamp",
"value": "payload.0.uid.date",
"valueType": "msg"
}
],
"inputOverride": "allow",
"outputProperties": [],
"x": 620,
"y": 600,
"wires": [
[]
]
},
{
"id": "6995391c94793f08",
"type": "server-events",
"z": "e44b1e7a8ef7ae1d",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.sunset_lighting_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "0",
"valueType": "num"
},
{
"property": "topic",
"propertyType": "msg",
"value": "timer-finished",
"valueType": "str"
}
],
"x": 120,
"y": 240,
"wires": [
[
"5ec63f0857df4164"
]
]
},
{
"id": "84d40e607426c66f",
"type": "ha-binary-sensor",
"z": "e44b1e7a8ef7ae1d",
"name": "Early Night Mode",
"entityConfig": "e27ae85e2a296e7c",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [
{
"property": "off",
"value": "start",
"valueType": "msg"
},
{
"property": "on",
"value": "end",
"valueType": "msg"
}
],
"inputOverride": "allow",
"outputProperties": [],
"x": 390,
"y": 40,
"wires": [
[
"f6836ec53245f207"
]
]
},
{
"id": "15a73af2f8ea690c",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Invert",
"func": "const daynight = msg.payload\n\nif (daynight === 1) {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"Day\"});\n msg.payload = 0\n} else if (daynight === 0) {\n node.status({fill:\"blue\",shape:\"dot\",text:\"Night\"});\n msg.payload = 1\n}\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 255,
"y": 40,
"wires": [
[
"84d40e607426c66f"
]
],
"l": false
},
{
"id": "cb5becd5a322ef50",
"type": "mqtt out",
"z": "e44b1e7a8ef7ae1d",
"name": "MQTT Publish",
"topic": "house/time/early_night_mode",
"qos": "0",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 660,
"y": 40,
"wires": []
},
{
"id": "f6836ec53245f207",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Invert",
"func": "const daynight = msg.payload\n\nif (daynight === 0) {\n node.status({fill:\"red\",shape:\"ring\",text:\"Off\"});\n msg.payload = \"off\"\n} else if (daynight === 1) {\n node.status({fill:\"green\",shape:\"dot\",text:\"On\"});\n msg.payload = \"on\"\n}\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 525,
"y": 40,
"wires": [
[
"cb5becd5a322ef50"
]
],
"l": false
},
{
"id": "369e5f1ea8730d39",
"type": "mqtt out",
"z": "e44b1e7a8ef7ae1d",
"name": "MQTT Publish",
"topic": "house/time/night_mode",
"qos": "1",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 400,
"y": 780,
"wires": []
},
{
"id": "9d4ffc704e9ff81e",
"type": "mqtt out",
"z": "e44b1e7a8ef7ae1d",
"name": "MQTT Publish",
"topic": "house/time/give_me_darkness",
"qos": "1",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 400,
"y": 720,
"wires": []
},
{
"id": "14ea08ea216a10b6",
"type": "server-state-changed",
"z": "e44b1e7a8ef7ae1d",
"name": "Night Mode",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_boolean.night_mode"
],
"substring": [],
"regex": []
},
"outputInitially": true,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 130,
"y": 780,
"wires": [
[
"369e5f1ea8730d39"
]
]
},
{
"id": "e6fdd1843b17def1",
"type": "server-state-changed",
"z": "e44b1e7a8ef7ae1d",
"name": "Give Me Darkness",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_boolean.give_me_darkness"
],
"substring": [],
"regex": []
},
"outputInitially": true,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 150,
"y": 720,
"wires": [
[
"9d4ffc704e9ff81e"
]
]
},
{
"id": "a605e8b865992be7",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Processing",
"func": "let tomorrow = msg.tomorrow\nlet today = msg.today\nlet number = {}\nlet work_tomorrow = {}\n\n// Check if calendar data exists\nif (!msg.payload || msg.payload.length === 0) {\n msg.payload = [{\n date: \"No Data\",\n eventStart: \"No Data\",\n eventEnd: \"No Data\",\n summary: \"No Data\",\n location: \"No Data\",\n isRecurring: \"No Data\",\n allDay: \"No Data\",\n calendarName: \"No Data\",\n countdown: \"No Data\",\n uid: { date: \"No Data\" }\n }]\n work_tomorrow = \"false\"\n number = 0\n} else {\n if (tomorrow > 0) {\n work_tomorrow = \"true\"\n if (today == 0) {\n number = 0\n } else {\n number = 1\n }\n } else {\n work_tomorrow = \"false\"\n number = 0\n }\n}\n\nmsg.work_tomorrow = work_tomorrow\n\nnode.status({fill:\"green\",shape:\"dot\",text:`Number ${number}`})\n\nif (number == 0) {\n node.send([msg,null])\n} else {\n node.send([null,msg])\n}",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 640,
"wires": [
[
"798ff6ede18394ea"
],
[
"469e44739d85f2c7"
]
],
"outputLabels": [
"Number 0",
"Number 1"
]
},
{
"id": "469e44739d85f2c7",
"type": "ha-binary-sensor",
"z": "e44b1e7a8ef7ae1d",
"name": "Work Tomorrow",
"entityConfig": "781adad6153d9661",
"version": 0,
"state": "work_tomorrow",
"stateType": "msg",
"attributes": [
{
"property": "date",
"value": "payload.1.date",
"valueType": "msg"
},
{
"property": "eventStart",
"value": "payload.1.eventStart",
"valueType": "msg"
},
{
"property": "eventEnd",
"value": "payload.1.eventEnd",
"valueType": "msg"
},
{
"property": "summary",
"value": "payload.1.summary",
"valueType": "msg"
},
{
"property": "location",
"value": "payload.1.location",
"valueType": "msg"
},
{
"property": "isRecurring",
"value": "payload.1.isRecurring",
"valueType": "msg"
},
{
"property": "allDay",
"value": "payload.1.allDay",
"valueType": "msg"
},
{
"property": "calendarName",
"value": "payload.1.calendarName",
"valueType": "msg"
},
{
"property": "countdown",
"value": "payload.1.countdown",
"valueType": "msg"
},
{
"property": "start_timestamp",
"value": "payload.1.uid.date",
"valueType": "msg"
}
],
"inputOverride": "allow",
"outputProperties": [],
"x": 620,
"y": 680,
"wires": [
[]
]
},
{
"id": "c59fac053d848a65",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Service Calls",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "",
"service": "",
"x": 590,
"y": 220,
"wires": [
[]
]
},
{
"id": "41df7a1ac03de337",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Script Calls",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "",
"service": "",
"x": 590,
"y": 280,
"wires": [
[]
]
},
{
"id": "7cc1659362b85ba0",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Notify Calls",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "",
"service": "",
"x": 590,
"y": 160,
"wires": [
[]
]
},
{
"id": "dd3f147b2583a136",
"type": "delay",
"z": "e44b1e7a8ef7ae1d",
"name": "",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 245,
"y": 180,
"wires": [
[
"5ec63f0857df4164"
]
],
"l": false
},
{
"id": "5ec63f0857df4164",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Processing",
"func": "//! FLOW VARIABLES DEFINED IN START TAB\n\n// Set Constants\n\nconst states = global.get('homeassistant.homeAssistant.states')\nconst holidayMode = states['input_boolean.holiday_mode'].state\nconst holidayHold = states['input_boolean.holiday_mode_hold'].state\nconst currentHoliday = states['input_select.holiday_animation'].state\nconst holiday = currentHoliday.toLowerCase()\nconst sunsetLights = states['input_boolean.sunset_lights_on'].state\nconst vacation = states['input_boolean.vacation_mode'].state\nconst upBathOcc = states['binary_sensor.upstairs_bathroom_occupied'].state\nconst deskLights = states['light.tina_desk_lights'].state\nconst luxLivingRoom = states['sensor.living_room_front_illuminance'].state\nconst luxThresholdLivingRoom = states['input_number.living_room_lux_threshold'].state\nconst luxStairwell = states['sensor.stairwell_bottom_illuminance'].state\nconst luxThresholdStairwell = states['input_number.stairwell_lux_threshold'].state\nconst adaptiveSleep = flow.get(\"adaptiveSleep\", \"diskCon\")\nconst selScenesMain = flow.get(\"selScenesMain\", \"diskCon\")\nconst selScenesTinaDesk = flow.get(\"selScenesTinaDesk\", \"diskCon\")\nconst booleanOff = flow.get(\"booleanOff\", \"diskCon\")\nconst payload = msg.payload\nnode.log(\"Time-based Automations: Constants Set\")\n\n// Set a few important variables\n\nlet time = {}\nlet topic = {}\nlet delay = {}\nlet eventCall = {}\n\nif (payload == 0) {\n time = \"night\"\n eventCall = \"on\"\n} else if (payload == 1) {\n time = \"day\"\n eventCall = \"off\"\n}\n\nif (msg.topic === 'timer-finished' || msg.topic === 'manual-trigger' || msg.topic === 'lux') {\n topic = msg.topic\n}\n\nif (topic === 'timer-finished' || topic === 'manual-trigger' || topic === 'lux') {\n delay = 'off'\n} else if (luxLivingRoom > luxThresholdLivingRoom && luxStairwell > luxThresholdStairwell) {\n delay = 'on'\n} else {\n delay = 'off'\n}\nnode.log(\"Time-based Automations: Main variables defined\")\n\n// ---------- Configuration ----------\n// Decide which nighttime lighting to turn off at sunrise\nlet lightsOff = []\n\nif (holidayHold === 'off') {\n lightsOff.push(\"light.front_porch_light\")\n}\n\nif (upBathOcc === 'off') {\n lightsOff.push(\"light.upstairs_bathroom_lights\")\n}\n\n// Sunset lights timer settings\nlet timerEntity = [\"timer.sunset_lighting_timer\"]\nlet timerDuration = \"00:30:00\"\n\n// Adaptive lighting switches to set\nlet switchAdaptive = []\nlet setAdaptive = {}\n\nif (time === 'day') {\n if (holidayHold === 'on'){\n switchAdaptive = flow.get(\"adaptiveDayHoliday\", \"diskCon\")\n } else {\n switchAdaptive = flow.get(\"adaptiveDay\", \"diskCon\")\n }\n setAdaptive = 'on'\n} else if (time === 'night') {\n switchAdaptive = flow.get(\"adaptiveNight\", \"diskCon\")\n if (holidayMode === 'on') {\n setAdaptive = 'off'\n } else {\n setAdaptive = 'on'\n }\n}\n\n// Notification settings\nlet notifyTitle = {}\nlet notifyMsg = {}\nlet sunsetStatus = {}\nif (sunsetLights === 'off') {\n notifyTitle = \"Sunset Lights SKIPPED\"\n notifyMsg = \"Lights not on due to nobody home, or toggle shutoff\"\n sunsetStatus = \"Skipped\"\n} else {\n notifyTitle = \"Sunset Lights On\"\n if (topic === 'timer-finished') {\n notifyMsg = \"Lights on because timer was finished manually\"\n sunsetStatus = \"Manual Trigger\"\n } else if (topic === 'lux') {\n notifyMsg = \"Lights on because light level dropped below threshold\"\n sunsetStatus = \"Light Level Trigger\"\n } else if (delay === 'on') {\n notifyMsg = \"Lights on after delay due to sufficient light\"\n sunsetStatus = \"Delayed\"\n } else if (delay === 'off') {\n notifyMsg = \"Lights on early due to low light\"\n sunsetStatus = \"Early\"\n }\n}\n\n// Holiday Settings\nlet setHoliday = {}\nlet switchHoliday = [\"switch.animated_scene_\" + holiday]\nif (holidayMode === 'on') {\n if (time === 'day') {\n setHoliday = 'off'\n } else if (time === 'night') {\n setHoliday = 'on'\n }\n}\n\nnode.log(\"Time-based Automations: Decision Logic Complete\")\n\n// ---------- Service Calls ----------\nlet sendLights = {\n \"payload\": {\n \"action\": \"light.turn_off\",\n \"target\": {\n \"entity_id\": lightsOff\n },\n \"data\": {}\n }\n}\n\nlet sendSleepOff = {\n \"payload\": {\n \"action\": \"switch.turn_off\",\n \"target\": {\n \"entity_id\": adaptiveSleep\n },\n \"data\": {}\n }\n}\n\nlet sendBooleanOff = {\n \"payload\": {\n \"action\": \"input_boolean.turn_off\",\n \"target\": {\n \"entity_id\": booleanOff\n },\n \"data\": {}\n }\n}\n\nlet sendAdaptive = {\n \"payload\": {\n \"action\": \"switch.turn_\" + setAdaptive,\n \"target\": {\n \"entity_id\": switchAdaptive\n },\n \"data\": {}\n }\n}\n\nlet sendSceneResetMain = {\n \"payload\": {\n \"action\": \"input_text.set_value\",\n \"target\": {\n \"entity_id\": selScenesMain\n },\n \"data\": {\n \"value\": \"Adaptive\"\n }\n }\n}\n\nlet sendSceneResetDesk = {\n \"payload\": {\n \"action\": \"input_text.set_value\",\n \"target\": {\n \"entity_id\": selScenesTinaDesk\n },\n \"data\": {\n \"value\": \"Day Mode\"\n }\n }\n}\n\nlet sendHoliday = {\n \"payload\": {\n \"action\": \"switch.turn_\" + setHoliday,\n \"target\": {\n \"entity_id\": switchHoliday\n },\n \"data\": {}\n }\n}\n\nlet sendTimer = {\n \"payload\": {\n \"action\": \"timer.start\",\n \"target\": {\n \"entity_id\": timerEntity\n },\n \"data\": {\n \"duration\": timerDuration\n }\n }\n}\n\nlet sendTimerCancel = {\n \"payload\": {\n \"action\": \"timer.cancel\",\n \"target\": {\n \"entity_id\": timerEntity\n },\n \"data\": {}\n }\n}\n\nlet sendNotifyPhone = {\n \"payload\": {\n \"action\": \"script.text_notify\",\n \"data\": {\n \"who\": \"all\",\n \"title\": notifyTitle,\n \"message\": notifyMsg,\n \"type\": \"normal\",\n \"tag\": \"sunset-lights\"\n }\n }\n}\n\nlet sendNotifyTV = {\n \"payload\": {\n \"action\": \"script.tv_notify\",\n \"data\": {\n \"who\": \"all\",\n \"title\": notifyTitle,\n \"message\": notifyMsg,\n \"data\": {\n \"fontsize\": \"large\",\n \"duration\": 3,\n \"transparency\": \"25%\"\n }\n }\n }\n}\n\nlet sendFirstFloorScene = {\n \"payload\": {\n \"action\": \"script.evening_on_first_floor\",\n \"data\": {\n \"sunset_lights\": 1\n }\n }\n}\n\nlet sendSecondFloorScene = {\n \"payload\": {\n \"action\": \"script.evening_on_second_floor\",\n \"data\": {\n \"sunset_lights\": 1\n }\n }\n}\n\nlet sendDeskScene = {\n \"payload\": {\n \"action\": \"input_select.select_option\",\n \"target\": {\n \"entity_id\": [\"input_select.tina_desk_scenes\"]\n },\n \"data\": {\n \"option\": \"Reset\"\n }\n }\n}\n\nlet sendExtraLights = {\n \"payload\": {\n \"event\": \"extraLights\",\n \"data\": {\n \"toggle\": eventCall\n }\n }\n}\n\nnode.log(\"Time-based Automations: Message Payloads Defined\")\n\nnode.log(\"----- Time-based Automations: Set Parameters\")\nnode.log(\"time: \" + time)\nnode.log(\"topic: \" + topic)\nnode.log(\"lightsOff: \" + lightsOff)\nnode.log(\"holidayMode: \" + holidayMode)\nnode.log(\"eventCall: \" + eventCall)\nif (time === 'night') {\n node.log(\"luxLivingRoom: \" + luxLivingRoom)\n node.log(\"luxThresholdLivingRoom: \" + luxThresholdLivingRoom)\n node.log(\"luxStairwell: \" + luxStairwell)\n node.log(\"luxThresholdStairwell: \" + luxThresholdStairwell)\n node.log(\"delay: \" + delay)\n node.log(\"sunsetStatus: \" + sunsetStatus)\n}\nif (holidayMode === 'on') {\n node.log(\"switchHoliday: \" + switchHoliday)\n node.log(\"holiday: \" + holiday)\n node.log(\"holidayHold: \" + holidayHold)\n node.log(\"switchHoliday: \" + switchHoliday)\n}\nnode.log(\"----- Time-based Automations: End Parameters -----\")\n\nif (vacation === 'off') {\n if (time === \"day\") {\n node.status({fill:\"green\",shape:\"dot\",text:\"Sunrise Flow\"})\n node.send([null,[sendLights,sendBooleanOff],null,sendExtraLights])\n setTimeout(() => {\n node.send([null,[sendSleepOff,sendAdaptive,sendSceneResetMain,sendSceneResetDesk],null,null])\n if (holidayMode === 'on' && holidayHold === 'off') {\n node.send([null,[sendHoliday],null,null])\n }\n }, 5000)\n } else if (time === \"night\") {\n node.status({fill:\"green\",shape:\"dot\",text:\"Sunset Flow\"})\n node.send([null,sendAdaptive,null,null])\n if (holidayMode === 'on') {\n setTimeout(() => {\n node.send([null,sendHoliday,null,null])\n }, 1000)\n }\n if (delay === 'on') {\n node.send([null,sendTimer,null,null])\n } else {\n if (topic === 'lux') {\n node.send([null,sendTimerCancel,null,null])\n }\n node.send([null,null,[sendFirstFloorScene,sendSecondFloorScene],sendExtraLights])\n if (deskLights === 'on') {\n node.send([null,sendDeskScene,null,null])\n }\n if (topic != 'manual-trigger') {\n node.send([[sendNotifyPhone,sendNotifyTV],null,null,null])\n }\n }\n }\n}\nnode.log(\"Time-based Automations: Processing Complete\")",
"outputs": 4,
"timeout": 0,
"noerr": 0,
"initialize": "//! ---------- DAY MODE ----------\n// Lists of adaptive lighting switches for different scenarios\nconst adaptiveDay = [\n \"switch.adaptive_lighting_basement_studio\",\n \"switch.adaptive_lighting_downstairs_bathroom\",\n \"switch.adaptive_lighting_emma_bedroom\",\n \"switch.adaptive_lighting_kallen_bedroom\",\n \"switch.adaptive_lighting_living_room\",\n \"switch.adaptive_lighting_master_bedroom\",\n \"switch.adaptive_lighting_mud_room\",\n \"switch.adaptive_lighting_tina_lamp\",\n \"switch.adaptive_lighting_upstairs_bathroom\",\n \"switch.adaptive_lighting_upstairs_hallway\",\n \"switch.adaptive_lighting_front_porch\"\n]\n\nconst adaptiveDayHoliday = [\n \"switch.adaptive_lighting_basement_studio\",\n \"switch.adaptive_lighting_downstairs_bathroom\",\n \"switch.adaptive_lighting_emma_bedroom\",\n \"switch.adaptive_lighting_kallen_bedroom\",\n \"switch.adaptive_lighting_living_room\",\n \"switch.adaptive_lighting_master_bedroom\",\n \"switch.adaptive_lighting_mud_room\",\n \"switch.adaptive_lighting_tina_lamp\",\n \"switch.adaptive_lighting_upstairs_bathroom\",\n \"switch.adaptive_lighting_upstairs_hallway\",\n]\n\n// List of adaptive lighting sleep mode switches to turn off\nconst adaptiveSleep = [\n \"switch.adaptive_lighting_sleep_mode_basement_studio\",\n \"switch.adaptive_lighting_sleep_mode_downstairs_bathroom\",\n \"switch.adaptive_lighting_sleep_mode_emma_bedroom\",\n \"switch.adaptive_lighting_sleep_mode_kallen_bedroom\",\n \"switch.adaptive_lighting_sleep_mode_living_room\",\n \"switch.adaptive_lighting_sleep_mode_master_bedroom\",\n \"switch.adaptive_lighting_sleep_mode_mud_room\",\n \"switch.adaptive_lighting_sleep_mode_tina_lamp\",\n \"switch.adaptive_lighting_sleep_mode_upstairs_bathroom\",\n \"switch.adaptive_lighting_sleep_mode_upstairs_hallway\"\n]\n\n// List of selected scene input texts to reset to Adaptive\nconst selScenesMain = [\n \"input_text.basement_studio_selected_scene\",\n \"input_text.downstairs_bathroom_selected_scene\",\n \"input_text.emma_bedroom_selected_scene\",\n \"input_text.front_porch_selected_scene\",\n \"input_text.kallen_bedroom_selected_scene\",\n \"input_text.living_room_selected_scene\",\n \"input_text.master_bedroom_selected_scene\",\n \"input_text.mud_room_selected_scene\",\n \"input_text.tina_lamp_selected_scene\",\n \"input_text.upstairs_bathroom_selected_scene\",\n \"input_text.upstairs_hallway_selected_scene\"\n]\n\n// Tina's desk reset\nconst selScenesTinaDesk = [\"input_text.tina_desk_selected_scene\"]\n\n// List of booleans to turn off\nconst booleanOff = [\n \"input_boolean.give_me_darkness\",\n \"input_boolean.goodnight\",\n \"input_boolean.kallen_computer_updates\",\n \"input_boolean.night_mode\"\n]\n\n//! ---------- NIGHT MODE ----------\n// Booleans to turn on at night\nconst adaptiveNight = [\n \"switch.adaptive_lighting_front_porch\"\n]\n\n\nflow.set(\"adaptiveDay\", adaptiveDay, \"diskCon\")\nflow.set(\"adaptiveDayHoliday\", adaptiveDayHoliday, \"diskCon\")\nflow.set(\"adaptiveNight\", adaptiveNight, \"diskCon\")\nflow.set(\"adaptiveSleep\", adaptiveSleep, \"diskCon\")\nflow.set(\"selScenesMain\", selScenesMain, \"diskCon\")\nflow.set(\"selScenesTinaDesk\", selScenesTinaDesk, \"diskCon\")\nflow.set(\"booleanOff\", booleanOff, \"diskCon\")",
"finalize": "",
"libs": [],
"x": 390,
"y": 180,
"wires": [
[
"7cc1659362b85ba0"
],
[
"c59fac053d848a65"
],
[
"41df7a1ac03de337"
],
[
"51c4e0e4f75a06df"
]
],
"outputLabels": [
"Notify",
"Services",
"Scripts",
""
],
"icon": "node-red-node-suncalc/sun.png"
},
{
"id": "51c4e0e4f75a06df",
"type": "ha-fire-event",
"z": "e44b1e7a8ef7ae1d",
"name": "Event Calls",
"server": "9e87348d.9c1c48",
"version": 0,
"event": "",
"data": "",
"dataType": "json",
"x": 590,
"y": 340,
"wires": [
[]
]
},
{
"id": "1e292a2db40e58de",
"type": "server-state-changed",
"z": "e44b1e7a8ef7ae1d",
"name": "Living Room",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"sensor.living_room_front_illuminance"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "num",
"ifState": "",
"ifStateType": "num",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "level",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "lux",
"valueType": "str"
},
{
"property": "room",
"propertyType": "msg",
"value": "living-room",
"valueType": "str"
},
{
"property": "payload",
"propertyType": "msg",
"value": "0",
"valueType": "num"
}
],
"x": 110,
"y": 360,
"wires": [
[
"96b23f9fc6e83696"
]
]
},
{
"id": "96b23f9fc6e83696",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Light Level Filter",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst luxThresholdLivingRoom = states['input_number.living_room_lux_threshold'].state\nconst luxThresholdStairwell = states['input_number.stairwell_lux_threshold'].state\nconst timer = states['timer.sunset_lighting_timer'].state\nconst level = msg.level\nconst room = msg.room\n\nif (timer === 'active') {\n if (room === 'living-room' && level <= luxThresholdLivingRoom) {\n node.status({fill:'green',shape:'dot',text:'Sent (Living Room)'})\n node.send(msg)\n } else if (room === 'stairwell-bottom' && level <= luxThresholdStairwell) {\n node.status({fill:'green',shape:'dot',text:'Sent (Stairwell Bottom)'})\n node.send(msg)\n }\n} else {\n node.status({fill:'red',shape:'ring',text:'Blocked'})\n}",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 235,
"y": 360,
"wires": [
[
"5ec63f0857df4164"
]
],
"icon": "node-red-node-suncalc/sun.png",
"l": false
},
{
"id": "501c93564516bb56",
"type": "server-state-changed",
"z": "e44b1e7a8ef7ae1d",
"name": "Stairwell",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"sensor.stairwell_bottom_illuminance"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "num",
"ifState": "",
"ifStateType": "num",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "level",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "lux",
"valueType": "str"
},
{
"property": "room",
"propertyType": "msg",
"value": "stairwell-bottom",
"valueType": "str"
},
{
"property": "payload",
"propertyType": "msg",
"value": "0",
"valueType": "num"
}
],
"x": 100,
"y": 420,
"wires": [
[
"96b23f9fc6e83696"
]
]
},
{
"id": "134433d6e21dab5b",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Tony Presence",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"person.tony_stork"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "home",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 120,
"wires": [
[
"77857e77d43a9d2e",
"7169f007c32ccc46",
"e6bdfba61c73d081",
"77bb530373808a86",
"f54ba77dfe1e7ba4"
],
[
"379edcf9fe985ebe",
"f54ba77dfe1e7ba4"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "77857e77d43a9d2e",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Enable Texts (Tony)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tony"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 410,
"y": 100,
"wires": [
[
"8c7c1cd31a824cd5"
]
]
},
{
"id": "379edcf9fe985ebe",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Disable Texts (Tony)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tony"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 420,
"y": 280,
"wires": [
[
"24a89088d5503778"
]
]
},
{
"id": "49dbd6d6cba1b010",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Tina Presence",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"person.christina_stork"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "home",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
},
{
"property": "tinawork",
"propertyType": "msg",
"value": "tinawork",
"valueType": "global"
}
],
"x": 170,
"y": 560,
"wires": [
[
"a0c7649e26e66ddb",
"35d7371023527600",
"edaa6ff605ba6fa7",
"77bb530373808a86",
"9d03fda88310da78",
"8c910479678a8f5e"
],
[
"898659d514aa58fd",
"8c910479678a8f5e"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "a0c7649e26e66ddb",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Enable Texts (Tina)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tina"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 410,
"y": 540,
"wires": [
[
"2851173db6835eda"
]
]
},
{
"id": "898659d514aa58fd",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Disable Texts (Tina)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tina"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 410,
"y": 720,
"wires": [
[
"82c0fb65066f3b67"
]
]
},
{
"id": "cd4d8dd6b1d34f49",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "Kallen Presence",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"person.kallen_stork"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "home",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 960,
"wires": [
[
"5193627a30d1b32d",
"77bb530373808a86",
"8a450e797b413418",
"547753c8de135e69"
],
[
"8584a491587be9a2",
"547753c8de135e69"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "5193627a30d1b32d",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "Enable Texts (Kallen)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_kallen"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 420,
"y": 940,
"wires": [
[
"8e081e76e5f19ead"
]
]
},
{
"id": "fb1afc4c2078ca29",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "Disable Texts (Kallen)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_kallen"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 640,
"y": 1000,
"wires": [
[
"156d50efeaeb681c"
]
]
},
{
"id": "35d7371023527600",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Notify Tony",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"type\":\"normal\",\t \"who\":\"tony\",\t \"title\": \"New Arrival\",\t \"message\": \"Tina has arrived at home!\",\t \"sound\":\"US-EN-Morgan-Freeman-Wife-Is-Arriving.wav\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "text_notify",
"x": 390,
"y": 660,
"wires": [
[
"bcdf2e5f1249631d"
]
]
},
{
"id": "9ae7e308f889137d",
"type": "wake on lan",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"mac": "B4:2E:99:A8:CF:88",
"host": "192.168.1.255",
"udpport": 9,
"numpackets": 3,
"interval": 100,
"name": "Boot Tina's Computer",
"x": 900,
"y": 500,
"wires": []
},
{
"id": "edaa6ff605ba6fa7",
"type": "change",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Formatting",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Christina has arrived at home!",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "New Arrival!",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 335,
"y": 600,
"wires": [
[
"10228956c46b8d7a"
]
],
"l": false
},
{
"id": "e6bdfba61c73d081",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Notify Tina",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "\t{\t \"type\":\"normal\",\t \"who\":\"tina\",\t \"title\": \"New Arrival\",\t \"message\": \"Tony has arrived at home!\",\t \"sound\":\"US-EN-Alexa-Husband-Is-Arriving.wav\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "text_notify",
"x": 390,
"y": 220,
"wires": [
[
"41aa4436b55474b2"
]
]
},
{
"id": "7169f007c32ccc46",
"type": "change",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Formatting",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Tony has arrived at home!",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "New Arrival!",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 335,
"y": 160,
"wires": [
[
"0a039e097233b977"
]
],
"l": false
},
{
"id": "41aa4436b55474b2",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Notify Kallen",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"type\":\"normal\",\t \"who\":\"kallen\",\t \"title\": \"New Arrival\",\t \"message\": \"Tony has arrived at home!\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "text_notify",
"x": 590,
"y": 200,
"wires": [
[]
]
},
{
"id": "bcdf2e5f1249631d",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Notify Kallen",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"type\":\"normal\",\t \"who\":\"kallen\",\t \"title\": \"New Arrival\",\t \"message\": \"Christina has arrived at home!\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "text_notify",
"x": 590,
"y": 640,
"wires": [
[]
]
},
{
"id": "7992545819db1a42",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Notify Tony",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"who\":\"tony\",\t \"title\": \"Hey Dummy\",\t \"message\": \"Your presence flow is a failure and you should be ashamed.\",\t \"data\": {\t \"url\": \"/lovelace/mobile-devices\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "text_notify",
"x": 870,
"y": 560,
"wires": [
[]
]
},
{
"id": "26f15fc8d75a4020",
"type": "link out",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "Presence Detection for Front Porch",
"mode": "link",
"links": [
"f34816b23181f21e"
],
"x": 995,
"y": 100,
"wires": []
},
{
"id": "6a1cecedd6ef4b44",
"type": "link in",
"z": "3abb5ae57afb4761",
"name": "Cleanup - Presence",
"links": [
"619d1474239faf58"
],
"x": 195,
"y": 40,
"wires": [
[
"bf504c30194524b9",
"ec497068c3a61d02",
"43048b96595e3e97",
"df53af0726555079",
"802ff36b76e55809",
"1ac137ebc9f53e3c"
]
]
},
{
"id": "bf504c30194524b9",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Tony Presence?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "person.tony_stork",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 180,
"y": 180,
"wires": [
[
"77857e77d43a9d2e"
],
[
"379edcf9fe985ebe"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "ec497068c3a61d02",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Tina Presence?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "person.christina_stork",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 180,
"y": 620,
"wires": [
[
"a0c7649e26e66ddb"
],
[
"898659d514aa58fd"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "43048b96595e3e97",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "Kallen Presence?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "person.kallen_stork",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 190,
"y": 1020,
"wires": [
[
"5193627a30d1b32d"
],
[
"8584a491587be9a2"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "0a039e097233b977",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "TV Notifications",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.tv_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"who\":\"all\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"25%\",\t \"color\": \"green\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "tv_notify",
"x": 600,
"y": 160,
"wires": [
[]
]
},
{
"id": "10228956c46b8d7a",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "TV Notifications",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.tv_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"who\":\"all\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"25%\",\t \"color\": \"green\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "tv_notify",
"x": 600,
"y": 600,
"wires": [
[]
]
},
{
"id": "77bb530373808a86",
"type": "change",
"z": "3abb5ae57afb4761",
"name": "Formatting",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "on",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 335,
"y": 40,
"wires": [
[
"26f15fc8d75a4020"
]
],
"l": false
},
{
"id": "47aa56df01f697fc",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "Front Door Open",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.front_door"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "door",
"valueType": "str"
},
{
"property": "whichdoor",
"propertyType": "msg",
"value": "front",
"valueType": "str"
}
],
"x": 850,
"y": 120,
"wires": [
[
"26f15fc8d75a4020",
"5f8b61ddc9963e99",
"025e65a78727f99e"
],
[
"26f15fc8d75a4020"
]
],
"outputLabels": [
"Open",
""
]
},
{
"id": "c46dfcaa9a2798f0",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "Doorbell",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.front_doorbell_ding_mqtt"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "doorbell",
"valueType": "str"
}
],
"x": 870,
"y": 300,
"wires": [
[
"26f15fc8d75a4020",
"025e65a78727f99e"
]
]
},
{
"id": "05547a934bbcab4d",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "Motion Detected",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.front_doorbell_motion_mqtt"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 850,
"y": 240,
"wires": [
[
"26f15fc8d75a4020",
"025e65a78727f99e"
]
],
"outputLabels": [
"On"
]
},
{
"id": "ff44de8d65439a5f",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "Back Door Open",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.back_door"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "door",
"valueType": "str"
},
{
"property": "whichdoor",
"propertyType": "msg",
"value": "back",
"valueType": "str"
}
],
"x": 850,
"y": 180,
"wires": [
[
"5f8b61ddc9963e99"
],
[]
],
"outputLabels": [
"Open",
""
]
},
{
"id": "5f8b61ddc9963e99",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "+1",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "counter.increment",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"counter.{{whichdoor}}_door_opened_today"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "counter",
"service": "increment",
"x": 1340,
"y": 200,
"wires": [
[]
]
},
{
"id": "0ba46659c49cf39a",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "MQTT Last Trigger",
"topic": "house/presence/outdoor/last_trigger",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 1300,
"y": 140,
"wires": []
},
{
"id": "025e65a78727f99e",
"type": "change",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "Set Payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "detect",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1100,
"y": 140,
"wires": [
[
"0ba46659c49cf39a"
]
]
},
{
"id": "028e16d90ac7433d",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "c19f180ec1dc0bcf",
"name": "Family Presence",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.family_home"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 1600,
"wires": [
[
"d5a9248680297b56",
"96ebe81b6e20112e"
],
[
"b8ef333da370f91e",
"96ebe81b6e20112e"
]
],
"outputLabels": [
"home",
"not_home"
]
},
{
"id": "d5a9248680297b56",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "c19f180ec1dc0bcf",
"name": "Enable Texts (All)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_all"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 450,
"y": 1600,
"wires": [
[
"66b7ec9a7e332cca"
]
]
},
{
"id": "b8ef333da370f91e",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "c19f180ec1dc0bcf",
"name": "Disable Texts (All)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_all"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 450,
"y": 1660,
"wires": [
[
"bebba6e7a61461b8"
]
]
},
{
"id": "351ac66c934832eb",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "e74c2fa5c53fd805",
"name": "Parents Presence",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.parents_home"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 190,
"y": 1160,
"wires": [
[
"331ed2d217025fd1",
"8811ce1d8dacd3b1"
],
[
"0eaa398b977e03b5",
"8811ce1d8dacd3b1"
]
]
},
{
"id": "df53af0726555079",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"g": "e74c2fa5c53fd805",
"name": "Parents Presence?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.parents_home",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 190,
"y": 1220,
"wires": [
[
"331ed2d217025fd1"
],
[
"0eaa398b977e03b5"
]
]
},
{
"id": "331ed2d217025fd1",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "e74c2fa5c53fd805",
"name": "Enable Texts (Parents)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_parents"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 460,
"y": 1160,
"wires": [
[
"63dc161e193d33c5"
]
]
},
{
"id": "0eaa398b977e03b5",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "e74c2fa5c53fd805",
"name": "Disable Texts (Parents)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_parents"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 470,
"y": 1220,
"wires": [
[
"84a56bf51e79fd4d"
]
]
},
{
"id": "663b5401ea953d2d",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "205da12d712d058b",
"name": "Nerds Presence",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.nerds_home"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 1380,
"wires": [
[
"a999c33047fc3b61",
"4e97de53400335b9"
],
[
"84a2692b31e7d7d8",
"4e97de53400335b9"
]
]
},
{
"id": "802ff36b76e55809",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"g": "205da12d712d058b",
"name": "Nerds Presence?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.nerds_home",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 190,
"y": 1440,
"wires": [
[
"a999c33047fc3b61"
],
[
"84a2692b31e7d7d8"
]
]
},
{
"id": "a999c33047fc3b61",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "205da12d712d058b",
"name": "Enable Texts (Nerds)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_nerds"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 460,
"y": 1380,
"wires": [
[
"bf5f6c5af1c02315"
]
]
},
{
"id": "84a2692b31e7d7d8",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "205da12d712d058b",
"name": "Disable Texts (Nerds)",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_nerds"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 460,
"y": 1440,
"wires": [
[
"dafcce5a61b19f8b"
]
]
},
{
"id": "1ac137ebc9f53e3c",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"g": "c19f180ec1dc0bcf",
"name": "Family Presence?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.family_home",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 190,
"y": 1660,
"wires": [
[
"d5a9248680297b56"
],
[
"b8ef333da370f91e"
]
]
},
{
"id": "788f7cfdfa2fdef9",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"g": "6a0fc544a641af5f",
"name": "Basement Door",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.basement_studio_door"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "door",
"valueType": "str"
},
{
"property": "whichdoor",
"propertyType": "msg",
"value": "basement_studio",
"valueType": "str"
}
],
"x": 1070,
"y": 220,
"wires": [
[
"5f8b61ddc9963e99"
],
[]
],
"outputLabels": [
"Open",
""
]
},
{
"id": "8c7c1cd31a824cd5",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "MQTT Publish",
"topic": "house/presence/people/tony",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 620,
"y": 100,
"wires": []
},
{
"id": "24a89088d5503778",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "MQTT Publish",
"topic": "house/presence/people/tony",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 620,
"y": 280,
"wires": []
},
{
"id": "2851173db6835eda",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "MQTT Publish",
"topic": "house/presence/people/tina",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 600,
"y": 540,
"wires": []
},
{
"id": "82c0fb65066f3b67",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "MQTT Publish",
"topic": "house/presence/people/tina",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 600,
"y": 720,
"wires": []
},
{
"id": "8e081e76e5f19ead",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "MQTT Publish",
"topic": "house/presence/people/kallen",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 620,
"y": 940,
"wires": []
},
{
"id": "156d50efeaeb681c",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "MQTT Publish",
"topic": "house/presence/people/kallen",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 840,
"y": 1000,
"wires": []
},
{
"id": "63dc161e193d33c5",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "e74c2fa5c53fd805",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/parents",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1160,
"wires": []
},
{
"id": "84a56bf51e79fd4d",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "e74c2fa5c53fd805",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/parents",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1220,
"wires": []
},
{
"id": "bf5f6c5af1c02315",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "205da12d712d058b",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/nerds",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1380,
"wires": []
},
{
"id": "dafcce5a61b19f8b",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "205da12d712d058b",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/nerds",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1440,
"wires": []
},
{
"id": "66b7ec9a7e332cca",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "c19f180ec1dc0bcf",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/family",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1600,
"wires": []
},
{
"id": "bebba6e7a61461b8",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"g": "c19f180ec1dc0bcf",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/family",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1660,
"wires": []
},
{
"id": "8a450e797b413418",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "Notify Parents",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"type\":\"normal\",\t \"who\":\"parents\",\t \"title\": \"New Arrival\",\t \"message\": \"Kallen has arrived at home!\",\t \"sound\":\"US-EN-Morgan-Freeman-Son-Is-Arriving.wav\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "text_notify",
"x": 400,
"y": 880,
"wires": [
[]
]
},
{
"id": "7fbab2c7cb7ecc92",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Give Me Darkness?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.give_me_darkness",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "givemedarkness",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1005,
"y": 440,
"wires": [
[
"5e72a180d8f0232d"
],
[]
],
"l": false
},
{
"id": "5e72a180d8f0232d",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Living Room Lights",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_lights"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 1150,
"y": 440,
"wires": [
[]
]
},
{
"id": "8584a491587be9a2",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "Bedroom Lights Off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.kallen_bedroom_lights"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"x": 410,
"y": 1000,
"wires": [
[
"fb1afc4c2078ca29"
]
]
},
{
"id": "9d03fda88310da78",
"type": "function",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Processing",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst workEndZone = states['binary_sensor.tina_work_end_zone'].state\nconst tinawork = msg.tinawork\n\nif (tinawork === 'on' && workEndZone === 'on') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Activated\"})\n return[msg,null]\n} else if (tinawork === 'on' && workEndZone === 'off') {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"Not time to leave yet\"})\n return null\n} else if (tinawork === 'off') {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"No Work Today\"})\n return null\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"We fucked up\"})\n node.warn(\"Tina presence flow encountered a situation we did not account for\")\n return[null,msg]\n}",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 480,
"wires": [
[
"9ae7e308f889137d",
"8a22032494f84cae"
],
[
"7992545819db1a42"
]
],
"outputLabels": [
"Activated",
"We fucked up"
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "8a22032494f84cae",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Lights Handler",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.tina_desk_lights"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 880,
"y": 440,
"wires": [
[
"7fbab2c7cb7ecc92"
]
]
},
{
"id": "547753c8de135e69",
"type": "link out",
"z": "3abb5ae57afb4761",
"g": "6c0f29670fcc9493",
"name": "Kallen Presence - Out",
"mode": "link",
"links": [
"de09ef54cbab864a"
],
"x": 335,
"y": 1060,
"wires": []
},
{
"id": "8c910479678a8f5e",
"type": "link out",
"z": "3abb5ae57afb4761",
"g": "bf0e3e8c2f5a5474",
"name": "Tina Presence - Out",
"mode": "link",
"links": [],
"x": 335,
"y": 780,
"wires": []
},
{
"id": "f54ba77dfe1e7ba4",
"type": "link out",
"z": "3abb5ae57afb4761",
"g": "7821289ad49774c9",
"name": "Tony Presence - Out",
"mode": "link",
"links": [],
"x": 335,
"y": 340,
"wires": []
},
{
"id": "8811ce1d8dacd3b1",
"type": "link out",
"z": "3abb5ae57afb4761",
"g": "e74c2fa5c53fd805",
"name": "Parents Presence - Out",
"mode": "link",
"links": [],
"x": 375,
"y": 1280,
"wires": []
},
{
"id": "4e97de53400335b9",
"type": "link out",
"z": "3abb5ae57afb4761",
"g": "205da12d712d058b",
"name": "Nerds Presence - Out",
"mode": "link",
"links": [],
"x": 375,
"y": 1500,
"wires": []
},
{
"id": "96ebe81b6e20112e",
"type": "link out",
"z": "3abb5ae57afb4761",
"g": "c19f180ec1dc0bcf",
"name": "Family Presence - Out",
"mode": "link",
"links": [],
"x": 375,
"y": 1720,
"wires": []
},
{
"id": "d95d9964546768a5",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "Downstairs Bathroom Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.downstairs_bathroom_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "downstairs_bathroom",
"valueType": "str"
}
],
"x": 160,
"y": 120,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "bdab41af28f2c7cd",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "Living Room Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.living_room_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "living_room",
"valueType": "str"
}
],
"x": 130,
"y": 60,
"wires": [
[
"85e820743550308b"
]
]
},
{
"id": "7c224927d50a5f97",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "Mud Room Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.mud_room_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "mud_room",
"valueType": "str"
}
],
"x": 130,
"y": 180,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "e689231430e9c829",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "Tina Lamp Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.tina_lamp_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "tina_lamp",
"valueType": "str"
}
],
"x": 130,
"y": 240,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "5123a607588fa737",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.downstairs_bathroom_lights"
],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 530,
"y": 1100,
"wires": [
[]
]
},
{
"id": "d790134891fedfcc",
"type": "subflow:a4ee891237e460a2",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "Main Scenes Handler",
"x": 600,
"y": 60,
"wires": []
},
{
"id": "74f9d2bf4a8c0b53",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "dcdfa098347020de",
"name": "Back Door Open",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.back_door"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "door",
"valueType": "str"
}
],
"x": 880,
"y": 60,
"wires": [
[
"f0ef9a565f72dcae"
],
[]
]
},
{
"id": "5e7a082800eeb73c",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "dcdfa098347020de",
"name": "Mud Room Lights",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [
"mud_room"
],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 1310,
"y": 60,
"wires": [
[
"1238a342e440e582"
]
]
},
{
"id": "f0ef9a565f72dcae",
"type": "api-current-state",
"z": "eff21041cc941fef",
"g": "dcdfa098347020de",
"name": "Early Night Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.early_night_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1090,
"y": 60,
"wires": [
[
"5e7a082800eeb73c"
],
[]
]
},
{
"id": "5a81041c4a1390b8",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "Tina Desk Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.tina_desk_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "tina_desk",
"valueType": "str"
}
],
"x": 130,
"y": 300,
"wires": [
[
"b19f4a996fd4c2ee"
]
]
},
{
"id": "b19f4a996fd4c2ee",
"type": "subflow:85c4f81ca9628aea",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "",
"x": 610,
"y": 300,
"wires": []
},
{
"id": "f84e6b5157e857cf",
"type": "function",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Delay",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst lights = states['light.downstairs_bathroom_lights'].state\nconst duration = states['input_number.downstairs_bathroom_lights_off_delay'].state\nconst lux = parseInt(states['sensor.downstairs_bathroom_illuminance'].state)\nconst threshold = parseInt(states['input_number.downstairs_bathroom_lux_threshold'].state)\nconst payload = msg.payload\nconst newDuration = duration * 60\n\nif (payload === 'on') {\n if (lux <= threshold && lights === 'off') {\n node.status({fill:'green',shape:'dot',text:'Turning lights on'})\n node.send([msg,msg,null])\n } else {\n if (lights === 'on') {\n node.status({fill:'red',shape:'ring',text:'Lights already on'})\n node.send([null,msg,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Too bright'})\n }\n }\n} else if (payload === 'off') {\n if (lights === 'on') {\n msg.duration = newDuration\n node.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'})\n node.send([null,null,msg])\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Lights already off\"})\n }\n}",
"outputs": 3,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 980,
"wires": [
[
"b281061a4b08d2eb"
],
[
"41a8d5ef20cf55d7"
],
[
"b7d94cd0e420c650"
]
],
"outputLabels": [
"Lights On",
"Cancel Timer",
"Start Timer"
],
"icon": "node-red/timer.svg"
},
{
"id": "b7d94cd0e420c650",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.downstairs_bathroom_lights_timer"
],
"labelId": [],
"data": "{ \t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 530,
"y": 1040,
"wires": [
[]
]
},
{
"id": "41a8d5ef20cf55d7",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.downstairs_bathroom_lights_timer"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 530,
"y": 980,
"wires": [
[]
]
},
{
"id": "3e40025ac99ec712",
"type": "server-events",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.downstairs_bathroom_lights_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 120,
"y": 1100,
"wires": [
[
"5123a607588fa737"
]
]
},
{
"id": "8d2e7fb5f214879c",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Motion Sensor",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "2bdf556c5a30e5d5",
"entities": {
"entity": [
"binary_sensor.downstairs_bathroom_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 110,
"y": 980,
"wires": [
[
"f84e6b5157e857cf"
]
],
"outputLabels": [
"on"
]
},
{
"id": "b281061a4b08d2eb",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.downstairs_bathroom_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 520,
"y": 920,
"wires": [
[]
]
},
{
"id": "85e820743550308b",
"type": "function",
"z": "eff21041cc941fef",
"g": "98e38052d1cc2f9b",
"name": "Adaptive",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst adaptBrt = states['switch.adaptive_lighting_adapt_brightness_living_room'].state\nconst adaptColor = states['switch.adaptive_lighting_adapt_color_living_room'].state\n\nif (adaptBrt === 'on' && adaptColor === 'off') {\n msg.brightness = 'true'\n msg.color = 'false'\n node.status({fill:\"yellow\",shape:\"dot\",text:\"Brightness Only\"});\n} else if (adaptColor === 'on' && adaptBrt === 'off') {\n msg.brightness = 'false'\n msg.color = 'true'\n node.status({fill:\"yellow\",shape:\"dot\",text:\"Color Only\"});\n} else {\n msg.brightness = 'true'\n msg.color = 'true'\n node.status({fill:\"green\",shape:\"dot\",text:\"Both\"});\n}\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 60,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "c983b44381b46ab5",
"type": "api-current-state",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Home?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.parents_home",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "presence",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 300,
"y": 400,
"wires": [
[
"bc3e0a041efec910",
"2c351b21e13b7289"
],
[]
]
},
{
"id": "bc3e0a041efec910",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Lights Backup",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "scene.create",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"scene_id\": lightsScene,\t \"snapshot_entities\":[\"light.living_room_overhead\",\"light.living_room_led_strip\",\"light.tina_lamp_top\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "scene",
"service": "create",
"x": 180,
"y": 480,
"wires": [
[
"41ababe9cfbe1297"
]
]
},
{
"id": "2c351b21e13b7289",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Adaptive Backup",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "scene.create",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"scene_id\": adaptiveScene,\t \"snapshot_entities\":[\"switch.adaptive_lighting_tina_lamp\",\"switch.adaptive_lighting_living_room\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "scene",
"service": "create",
"x": 190,
"y": 540,
"wires": [
[
"71e6ae54dc1b958b"
]
]
},
{
"id": "71e6ae54dc1b958b",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Adaptive Off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "switch.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_living_room",
"switch.adaptive_lighting_tina_lamp"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "switch",
"service": "turn_off",
"x": 390,
"y": 540,
"wires": [
[]
]
},
{
"id": "41ababe9cfbe1297",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Lights Green",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_led_strip",
"light.living_room_lights",
"light.tina_lamp"
],
"labelId": [],
"data": "{\t \"color_name\":\"green\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 550,
"y": 480,
"wires": [
[
"c0ce3c040d25e0a1"
]
]
},
{
"id": "c0ce3c040d25e0a1",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Flash LED Strip",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "lifx.effect_pulse",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_led_strip"
],
"labelId": [],
"data": "{\t \"power_on\":\"true\",\t \"mode\":\"ping\",\t \"period\": 1,\t \"cycles\": 30,\t \"color_name\":\"white\",\t \"brightness\": 255\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "lifx",
"service": "effect_pulse",
"x": 740,
"y": 480,
"wires": [
[
"e67a2b594c648ac6"
]
]
},
{
"id": "e67a2b594c648ac6",
"type": "ha-wait-until",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Wait for door",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"entities": {
"entity": [
"binary_sensor.front_door"
],
"substring": [],
"regex": []
},
"property": "state",
"comparator": "is",
"value": "on",
"valueType": "str",
"timeout": "30",
"timeoutType": "num",
"timeoutUnits": "seconds",
"checkCurrentState": true,
"blockInputOverrides": true,
"outputProperties": [],
"entityLocation": "data",
"entityLocationType": "none",
"x": 610,
"y": 580,
"wires": [
[
"45df5f447e52cb0f"
],
[
"45df5f447e52cb0f"
]
]
},
{
"id": "e8510a6c66cd84e6",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Lights Restore",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "scene.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"scene.{{lightsScene}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "scene",
"service": "turn_on",
"x": 980,
"y": 580,
"wires": [
[
"2ebe03f5023de47c"
]
]
},
{
"id": "2ebe03f5023de47c",
"type": "delay",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "",
"pauseType": "delay",
"timeout": "3",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1105,
"y": 580,
"wires": [
[
"12e827e7416c9dac"
]
],
"l": false
},
{
"id": "12e827e7416c9dac",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Stop Effect",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "lifx.effect_stop",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_led_strip"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "lifx",
"service": "effect_stop",
"x": 1230,
"y": 580,
"wires": [
[
"e3ecd23a34c7f82e"
]
]
},
{
"id": "e3ecd23a34c7f82e",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Adaptive Restore",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "scene.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"scene.{{adaptiveScene}}"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "scene",
"service": "turn_on",
"x": 1430,
"y": 580,
"wires": [
[]
]
},
{
"id": "58b11f0c0353d67b",
"type": "comment",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Still need to add support for returning to living room media scenes",
"info": "",
"x": 270,
"y": 600,
"wires": []
},
{
"id": "45df5f447e52cb0f",
"type": "function",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Media?",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst media = states['input_boolean.living_room_entertainment_mode'].state\n\nif (media === 'on') {\n msg.payload = 'on'\n msg.alert = 'on'\n node.status({fill:\"green\",shape:\"dot\",text:\"Media App Running\"})\n return[msg,null]\n} else {\n node.status({fill:\"blue\",shape:\"dot\",text:\"Otherwise\"})\n return[null,msg]\n}",
"outputs": 2,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 780,
"y": 580,
"wires": [
[
"e23e7b080ee3773f"
],
[
"e8510a6c66cd84e6"
]
],
"outputLabels": [
"media app running",
"otherwise"
]
},
{
"id": "e23e7b080ee3773f",
"type": "link out",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Doorbell to Media",
"mode": "link",
"links": [
"27b2c22907382e6d",
"8146f43fea5aec03"
],
"x": 915,
"y": 520,
"wires": []
},
{
"id": "1e1059008d19c0ee",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "31767ffd6a647579",
"name": "Doorbell Rings",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "7d2b67c31769ed69",
"entities": {
"entity": [
"binary_sensor.front_doorbell_ding_mqtt"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "lightsScene",
"propertyType": "msg",
"value": "doorbell_lights_restore",
"valueType": "str"
},
{
"property": "adaptiveScene",
"propertyType": "msg",
"value": "doorbell_adaptive_restore",
"valueType": "str"
}
],
"x": 120,
"y": 400,
"wires": [
[
"c983b44381b46ab5"
],
[]
]
},
{
"id": "87d449113f439710",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Living Room Front Motion",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "4a9187b8b68e4181",
"entities": {
"entity": [
"binary_sensor.living_room_front_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 150,
"y": 700,
"wires": [
[
"7305cfffd320c75a"
]
]
},
{
"id": "29c0dbf6add54879",
"type": "server-events",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.living_room_motion_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "finished",
"valueType": "str"
},
{
"property": "topic",
"propertyType": "msg",
"value": "timer",
"valueType": "str"
}
],
"x": 180,
"y": 820,
"wires": [
[
"7305cfffd320c75a"
]
]
},
{
"id": "7305cfffd320c75a",
"type": "function",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Living Room Processing",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst peoplePresent = states['binary_sensor.people_present'].state\nconst vacationMode = states['input_boolean.vacation_mode'].state\nconst nightMode = states['input_boolean.night_mode'].state\nconst kallenSleeping = states['input_boolean.kallen_sleeping'].state\nconst kallenOvernight = states['input_boolean.kallen_overnight'].state\nconst duration = states['input_number.living_room_lights_off_delay'].state\nconst guestMode = states['input_boolean.guest_mode'].state\nconst newDuration = duration * 60\nconst topic = msg.topic\nconst payload = msg.payload\n\nlet block = {}\n\nif ((peoplePresent === 'on' && vacationMode === 'off' && nightMode === 'on' && guestMode === 'off') && (kallenSleeping === 'on' || kallenOvernight === 'on')) {\n block = false\n} else {\n block = true\n}\n\nif (topic === 'motion' && block === false) {\n if (payload === 'on') {\n node.status({fill:'green',shape:'dot',text:'Motion On'})\n node.send([msg,null,null])\n } else if (payload === 'off') {\n msg.duration = newDuration\n node.status({fill:'red',shape:'ring',text:parseInt(duration) + ' minutes'})\n node.send([null,msg,null])\n }\n} else if (topic === 'timer') {\n if (payload === 'finished') {\n node.status({fill:'green',shape:'dot',text:'Timer Finished'})\n node.send([null,null,msg])\n }\n} else if (block === true) {\n node.status({fill:'red',shape:'ring',text:'Blocked'})\n}",
"outputs": 3,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 430,
"y": 760,
"wires": [
[
"130c6ac167cd49f0"
],
[
"bcbc098444744cbb"
],
[
"f31cabbf0dd66d75"
]
],
"outputLabels": [
"Motion On",
"Motion Off",
"Timer Finished"
],
"icon": "node-red-contrib-huemagic/hue-motion.svg"
},
{
"id": "f511cce02d6ad811",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Living Room Lights",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_lights"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 850,
"y": 700,
"wires": [
[
"7c33144c3e356edf"
]
]
},
{
"id": "130c6ac167cd49f0",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.living_room_motion_timer"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 650,
"y": 700,
"wires": [
[
"f511cce02d6ad811"
]
]
},
{
"id": "7c33144c3e356edf",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.living_room_scenes"
],
"labelId": [],
"data": "{\t \"option\": \"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 1050,
"y": 700,
"wires": [
[]
]
},
{
"id": "bcbc098444744cbb",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.living_room_motion_timer"
],
"labelId": [],
"data": "{\t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 650,
"y": 760,
"wires": [
[]
]
},
{
"id": "f31cabbf0dd66d75",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Lights Off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_lights"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"x": 640,
"y": 820,
"wires": [
[]
]
},
{
"id": "de9fe68a439b4c41",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Motion Sensor",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "c5511d32d6044b83",
"entities": {
"entity": [
"binary_sensor.mud_room_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 110,
"y": 1260,
"wires": [
[
"7c4cc52be117251f"
]
],
"outputLabels": [
"on"
]
},
{
"id": "7c4cc52be117251f",
"type": "function",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Delay",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst lights = states['light.mud_room_overhead'].state\nconst selScene = states['input_text.mud_room_selected_scene'].state\nconst duration = states['input_number.mud_room_lights_off_delay'].state\nconst lux = parseInt(states['sensor.mud_room_illuminance'].state)\nconst threshold = parseInt(states['input_number.mud_room_lux_threshold'].state)\nconst payload = msg.payload\nconst newDuration = duration * 60\n\nif (payload === 'on') {\n if (lux <= threshold && (lights === 'off' || selScene === 'Nightlight')) {\n node.status({fill:'green',shape:'dot',text:'Turning lights on'})\n node.send([msg,msg,null])\n } else {\n if (lights === 'on') {\n node.status({fill:'red',shape:'ring',text:'Lights already on'})\n node.send([null,msg,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Too bright'})\n }\n }\n} else if (payload === 'off') {\n if (lights === 'on') {\n msg.duration = newDuration\n node.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'})\n node.send([null,null,msg])\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Lights already off\"})\n }\n}",
"outputs": 3,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 1260,
"wires": [
[
"67d04dc394a23636"
],
[
"ddae3391e8b78cb8"
],
[
"0c70e666ebfcd6c1"
]
],
"outputLabels": [
"Lights On",
"Cancel Timer",
"Start Timer"
],
"icon": "node-red/timer.svg"
},
{
"id": "a7cd304d11f25e60",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Lights Adaptive",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.mud_room_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 700,
"y": 1200,
"wires": [
[]
]
},
{
"id": "ddae3391e8b78cb8",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.mud_room_motion_timer"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 530,
"y": 1260,
"wires": [
[]
]
},
{
"id": "0c70e666ebfcd6c1",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.mud_room_motion_timer"
],
"labelId": [],
"data": "{ \t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 530,
"y": 1320,
"wires": [
[]
]
},
{
"id": "67d04dc394a23636",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [
"mud_room"
],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 520,
"y": 1200,
"wires": [
[
"a7cd304d11f25e60"
]
]
},
{
"id": "d4c7136ad434c2b5",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.mud_room_overhead"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 530,
"y": 1440,
"wires": [
[]
]
},
{
"id": "95fe501e85a5f65b",
"type": "server-events",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.mud_room_motion_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 120,
"y": 1380,
"wires": [
[
"5d9a85d3534d83e6"
]
]
},
{
"id": "5d9a85d3534d83e6",
"type": "api-current-state",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Early Night Mode?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.early_night_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "earlynight",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 330,
"y": 1380,
"wires": [
[
"fa7c83f1dece9741"
],
[
"d4c7136ad434c2b5"
]
]
},
{
"id": "fa7c83f1dece9741",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "ab4dbcc968a1d346",
"name": "Lights Nightlight",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.mud_room_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 540,
"y": 1380,
"wires": [
[]
]
},
{
"id": "c96c398bc26cfc26",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "0f7fdf39e4400032",
"name": "Living Room Back Motion",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "4a9187b8b68e4181",
"entities": {
"entity": [
"binary_sensor.living_room_back_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 150,
"y": 760,
"wires": [
[
"7305cfffd320c75a"
]
]
},
{
"id": "1238a342e440e582",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "dcdfa098347020de",
"name": "Set Bright",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.mud_room_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Bright\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "input_select",
"service": "select_option",
"x": 1500,
"y": 60,
"wires": [
[]
]
},
{
"id": "879ee8903841b8f0",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "fd15bf62ba5e5171",
"name": "Upstairs Hallway Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.upstairs_hallway_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "upstairs_hallway",
"valueType": "str"
}
],
"x": 150,
"y": 300,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "bc2426cfcd5afbe8",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "fd15bf62ba5e5171",
"name": "Upstairs Bathroom Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.upstairs_bathroom_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "upstairs_bathroom",
"valueType": "str"
}
],
"x": 150,
"y": 60,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "a5498446c1edffa9",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "fd15bf62ba5e5171",
"name": "Kallen Bedroom Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.kallen_bedroom_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "kallen_bedroom",
"valueType": "str"
}
],
"x": 140,
"y": 120,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "f28e7fd88f75041e",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "fd15bf62ba5e5171",
"name": "Emma Bedroom Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.emma_bedroom_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "emma_bedroom",
"valueType": "str"
}
],
"x": 150,
"y": 180,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "e1123236ee16fdaf",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "fd15bf62ba5e5171",
"name": "Master Bedroom Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.master_bedroom_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "master_bedroom",
"valueType": "str"
}
],
"x": 150,
"y": 240,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "a1ee07ab20229b45",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Motion Detected",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "b721c7240c08272f",
"entities": {
"entity": [
"binary_sensor.upstairs_bathroom_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 120,
"y": 460,
"wires": [
[
"fd33d3e819d8c772"
]
],
"outputLabels": [
"On"
]
},
{
"id": "74c0ced4ac160364",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.upstairs_bathroom_lights"
],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 1330,
"y": 640,
"wires": [
[]
]
},
{
"id": "a17d58585048335d",
"type": "subflow:a4ee891237e460a2",
"z": "5e238cbbe6d612c9",
"g": "fd15bf62ba5e5171",
"name": "",
"x": 520,
"y": 60,
"wires": []
},
{
"id": "d2df58b074b9ba08",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Adaptive",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 570,
"y": 400,
"wires": [
[]
]
},
{
"id": "83686fab02a3d825",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"labelId": [],
"data": "{\t \"option\": option\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 1330,
"y": 580,
"wires": [
[]
]
},
{
"id": "853abef16fadc824",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Shower Mode",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_boolean.shower_mode"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "toggle",
"valueType": "str"
},
{
"property": "showermode",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 110,
"y": 640,
"wires": [
[
"f70e4a4480d43b2b"
]
],
"outputLabels": [
"On"
]
},
{
"id": "2ad7be43ccdbdeaf",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"labelId": [],
"data": "{\t \"option\": scene\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 490,
"y": 640,
"wires": [
[]
]
},
{
"id": "ea02f8930aa2c7aa",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Turn Off Lights",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.upstairs_bathroom_lights"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"x": 500,
"y": 700,
"wires": [
[
"8859759915625e2f"
]
]
},
{
"id": "8859759915625e2f",
"type": "delay",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 625,
"y": 700,
"wires": [
[
"3941b4a5b3493461"
]
],
"l": false
},
{
"id": "3941b4a5b3493461",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Adaptive On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "switch.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_upstairs_bathroom"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "switch",
"service": "turn_on",
"x": 750,
"y": 700,
"wires": [
[
"0b122b02cfb10c25"
]
]
},
{
"id": "0b122b02cfb10c25",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Scene Text",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_text.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.upstairs_bathroom_selected_scene"
],
"labelId": [],
"data": "{\t \"value\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_text",
"service": "set_value",
"x": 940,
"y": 700,
"wires": [
[]
]
},
{
"id": "31b8c8291d19ffc6",
"type": "link out",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Shower Mode Out",
"mode": "link",
"links": [
"7a7f626dce181b23"
],
"x": 545,
"y": 580,
"wires": []
},
{
"id": "55e84ccb73ae9b74",
"type": "link in",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Goodnight - Lighting",
"links": [
"60ce44747cf3e507"
],
"x": 405,
"y": 520,
"wires": [
[
"a1fa2d2d1f55af4b"
]
]
},
{
"id": "017de174925e8c75",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Motion Detected",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.upstairs_bathroom_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "stop",
"valueType": "str"
}
],
"x": 1100,
"y": 460,
"wires": [
[
"5e00ecbccbe51462"
],
[]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "2dc5f9d3e00f4ddc",
"type": "stoptimer",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"duration": "2",
"units": "Minute",
"payloadtype": "num",
"payloadval": "0",
"name": "Wait 2 Minutes",
"x": 1340,
"y": 460,
"wires": [
[
"86922621398f4b79"
],
[]
]
},
{
"id": "86922621398f4b79",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.upstairs_bathroom_lights"
],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 1530,
"y": 460,
"wires": [
[]
]
},
{
"id": "a1fa2d2d1f55af4b",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.upstairs_bathroom_motion_timer"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "stop",
"valueType": "str"
}
],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 570,
"y": 520,
"wires": [
[
"34e2055344eea8fe"
]
]
},
{
"id": "463689442b9d2046",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.upstairs_bathroom_motion_timer"
],
"labelId": [],
"data": "{ \t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 570,
"y": 460,
"wires": [
[]
]
},
{
"id": "5350d2264880d0ad",
"type": "server-events",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.upstairs_bathroom_motion_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 900,
"y": 580,
"wires": [
[
"b9741e2e2ed0448b"
]
]
},
{
"id": "b9741e2e2ed0448b",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Timer Finished",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst showerMode = states['input_boolean.shower_mode'].state\nconst earlyNightMode = states['binary_sensor.early_night_mode'].state\nconst kallenOvernight = states['input_boolean.kallen_overnight'].state\nconst nightMode = states['input_boolean.night_mode'].state\nconst masterBedroomSleep = states['input_boolean.master_bedroom_sleeping'].state\n\nlet scene = 'Single Nightlight'\nlet late = {}\n\nif (nightMode === 'on' || (earlyNightMode === 'on' && masterBedroomSleep === 'on')) {\n late = true\n} else {\n late = false\n}\n\nif (showerMode === 'off') {\n if (earlyNightMode === 'off') {\n node.send([null,null,msg])\n node.status({fill:'green',shape:'dot',text:'Lights Off'})\n } else {\n msg.option = scene\n node.send([null,msg,null])\n if (late === true && kallenOvernight === 'on') {\n node.send([msg,null,null])\n }\n node.status({fill:'green',shape:'dot',text:'Scene set to ' + scene})\n }\n} else {\n node.status({fill:'red',shape:'ring',text:'Blocked'})\n}\n\nnode.log(\"----- Upstairs Bathroom Timer Parameters Start -----\")\nnode.log(\"Upstairs Bathroom showerMode: \" + showerMode)\nnode.log(\"Upstairs Bathroom earlyNightMode: \" + showerMode)\nnode.log(\"Upstairs Bathroom kallenOvernight: \" + kallenOvernight)\nnode.log(\"Upstairs Bathroom nightMode: \" + nightMode)\nnode.log(\"Upstairs Bathroom masterBedroomSleep: \" + masterBedroomSleep)\nnode.log(\"Upstairs Bathroom scene: \" + scene)\nnode.log(\"Upstairs Bathroom late: \" + late)\nnode.log(\"----- Upstairs Bathroom Timer Parameters End -----\")",
"outputs": 3,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1100,
"y": 580,
"wires": [
[
"5e00ecbccbe51462"
],
[
"83686fab02a3d825"
],
[
"74c0ced4ac160364"
]
],
"outputLabels": [
"Overnight",
"Scene",
"Lights Off"
]
},
{
"id": "f18aab5a5bda9a84",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Stairwell",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.stairwell_led_strip"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 520,
"y": 1040,
"wires": [
[]
]
},
{
"id": "293a957a5c4f79fa",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "On/Off",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst stairwellLights = states['light.stairwell_led_strip'].state\nconst hallwayLights = states['light.hallway_overhead'].state\nconst earlyNightMode = states['binary_sensor.early_night_mode'].state\nconst nightMode = states['input_boolean.night_mode'].state\nconst goodnight = states['input_boolean.goodnight'].state\nconst masterBedroomSleep = states['input_boolean.master_bedroom_sleeping'].state\nconst kallenBedroomSleep = states['input_boolean.kallen_sleeping'].state\nconst peopleSleeping = (masterBedroomSleep === 'on' || kallenBedroomSleep === 'on')\nconst duration = states['input_number.stairwell_lights_off_delay'].state\nconst lux = parseInt(states['sensor.stairwell_bottom_illuminance'].state)\nconst threshold = parseInt(states['input_number.stairwell_lux_threshold'].state)\nconst payload = msg.payload\nconst newDuration = duration * 60\n\nlet hallwayScene = {}\nlet hallwayAction = {}\n\nif (payload === 'on') {\n if (goodnight === 'on') {\n hallwayAction = 'off'\n } else if (nightMode === 'on' || (peopleSleeping === true && earlyNightMode === 'on')) {\n hallwayAction = 'on'\n hallwayScene = 'Nightlight'\n } else if (earlyNightMode === 'on') {\n hallwayAction = 'on'\n hallwayScene = 'Adaptive'\n } else {\n hallwayAction = 'off'\n }\n}\n\nmsg.hallway = hallwayAction\nmsg.scene = hallwayScene\n\nif (payload === 'on') {\n if (lux <= threshold || stairwellLights === 'on' || hallwayLights === 'on') {\n if (hallwayScene === 'Adaptive') {\n node.send([null,null,msg,msg])\n } else if (hallwayAction === 'on') {\n node.send([null,null,msg,null])\n }\n node.status({fill:'green',shape:'dot',text:'Lights On'})\n node.send([msg,null,null,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Too bright'})\n }\n} else if (payload === 'off') {\n if (stairwellLights === 'on' || hallwayLights === 'on') {\n msg.duration = newDuration\n node.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'})\n node.send([null,msg,null,null])\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Lights already off\"})\n }\n}",
"outputs": 4,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 880,
"wires": [
[
"4e3d058c164d6a97"
],
[
"96e7237a63089317"
],
[
"b05b87a1e43f11f9"
],
[
"48c5c102461f0981"
]
],
"outputLabels": [
"Stairwell",
"Timer",
"Hallway Scene",
"Hallway On/Off"
],
"icon": "node-red/timer.svg"
},
{
"id": "96e7237a63089317",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.stairwell_motion_timer"
],
"labelId": [],
"data": "{ \t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 530,
"y": 860,
"wires": [
[]
]
},
{
"id": "33ba5ffd653f09a1",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.stairwell_motion_timer"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 710,
"y": 800,
"wires": [
[]
]
},
{
"id": "0df82708f1ef261c",
"type": "server-events",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.stairwell_motion_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 120,
"y": 980,
"wires": [
[
"76423fc24fedb52c"
]
]
},
{
"id": "48c2ad199a4ab538",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Motion Sensor",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "e86f48a9dd99dd2b",
"entities": {
"entity": [
"binary_sensor.stairwell_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 110,
"y": 880,
"wires": [
[
"293a957a5c4f79fa"
]
],
"outputLabels": [
"on"
]
},
{
"id": "4e3d058c164d6a97",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.stairwell_led_strip"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 520,
"y": 800,
"wires": [
[
"33ba5ffd653f09a1"
]
]
},
{
"id": "c3f2a4aa281295ce",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.emma_bedroom_light"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 530,
"y": 1380,
"wires": [
[]
]
},
{
"id": "3b698d0a4f2620bd",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Delay",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst lights = states['light.emma_bedroom_light'].state\nconst duration = states['input_number.emma_bedroom_lights_off_delay'].state\nconst lux = parseInt(states['sensor.emma_bedroom_illuminance'].state)\nconst threshold = parseInt(states['input_number.emma_bedroom_lux_threshold'].state)\nconst sleeping = states['input_boolean.emma_sleeping'].state\nconst payload = msg.payload\nconst newDuration = duration * 60\n\nif (sleeping === 'off') {\n if (payload === 'on') {\n if (lux <= threshold && lights === 'off') {\n node.status({fill:'green',shape:'dot',text:'Turning lights on'})\n node.send([msg,msg,null])\n } else {\n if (lights === 'on') {\n node.status({fill:'red',shape:'ring',text:'Lights already on'})\n node.send([null,msg,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Too bright'})\n }\n }\n } else if (payload === 'off') {\n if (lights === 'on') {\n msg.duration = newDuration\n node.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'})\n node.send([null,null,msg])\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Lights already off\"})\n }\n }\n} else {\n node.status({fill:'red',shape:'ring',text:'Blocked (Sleeping)'})\n}",
"outputs": 3,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 1260,
"wires": [
[
"440fc7142e7345d4"
],
[
"b058c2262ac522ff"
],
[
"55c893b1d3009fed"
]
],
"outputLabels": [
"Lights On",
"Cancel Timer",
"Start Timer"
],
"icon": "node-red/timer.svg"
},
{
"id": "55c893b1d3009fed",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.emma_bedroom_motion_timer"
],
"labelId": [],
"data": "{ \t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 530,
"y": 1320,
"wires": [
[]
]
},
{
"id": "b058c2262ac522ff",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.emma_bedroom_motion_timer"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 530,
"y": 1260,
"wires": [
[]
]
},
{
"id": "b542615d3dee41f6",
"type": "server-events",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.emma_bedroom_motion_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 120,
"y": 1380,
"wires": [
[
"cef61cdb2808ce5a"
]
]
},
{
"id": "fc25e2a837ec8229",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Motion Sensor",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "f3f1bf31d66d2f88",
"entities": {
"entity": [
"binary_sensor.emma_bedroom_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 110,
"y": 1260,
"wires": [
[
"3b698d0a4f2620bd"
]
],
"outputLabels": [
"on"
]
},
{
"id": "440fc7142e7345d4",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.emma_bedroom_light"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 520,
"y": 1200,
"wires": [
[]
]
},
{
"id": "cef61cdb2808ce5a",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Sleep Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.emma_sleeping",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 330,
"y": 1380,
"wires": [
[
"c3f2a4aa281295ce"
],
[]
]
},
{
"id": "fd33d3e819d8c772",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Motion Detected",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst lights = states['light.upstairs_bathroom_lights'].state\nconst duration = states['input_number.upstairs_bathroom_motion_off_delay'].state\nconst lux = parseInt(states['sensor.upstairs_bathroom_illuminance'].state)\nconst threshold = parseInt(states['input_number.upstairs_bathroom_lux_threshold'].state)\nconst showerMode = states['input_boolean.shower_mode'].state\nconst payload = msg.payload\nconst newDuration = duration * 60\n\nlet timerCancel = {\n \"payload\": \"stop\"\n}\n\nif (showerMode === 'off') {\n if (payload === 'on') {\n node.send([null,null,timerCancel])\n if (lux <= threshold || lights === 'on') {\n node.status({fill:'green',shape:'dot',text:'Lights On'})\n node.send([msg,null,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Too bright'})\n }\n } else if (payload === 'off') {\n if (lights === 'on') {\n msg.duration = newDuration\n node.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'})\n node.send([null,msg,null])\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Lights already off\"})\n }\n }\n}\n\nnode.log(\"----- Upstairs Bathroom Motion Parameters Start -----\")\nnode.log(\"Upstairs Bathroom payload: \" + payload)\nnode.log(\"Upstairs Bathroom lights: \" + lights)\nnode.log(\"Upstairs Bathroom duration: \" + duration)\nnode.log(\"Upstairs Bathroom newDuration: \" + newDuration)\nnode.log(\"Upstairs Bathroom lux: \" + lux)\nnode.log(\"Upstairs Bathroom threshold: \" + threshold)\nnode.log(\"Upstairs Bathroom showerMode: \" + showerMode)\nnode.log(\"----- Upstairs Bathroom Motion Parameters End -----\")",
"outputs": 3,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 460,
"wires": [
[
"d2df58b074b9ba08"
],
[
"463689442b9d2046"
],
[
"a1fa2d2d1f55af4b"
]
],
"outputLabels": [
"On",
"Off",
"Timer Cancel"
]
},
{
"id": "f70e4a4480d43b2b",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Shower Mode",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst occupied = states['binary_sensor.upstairs_bathroom_occupied'].state\nconst earlyNightMode = states['binary_sensor.early_night_mode'].state\nconst nightMode = states['input_boolean.night_mode'].state\nconst kallenOvernight = states['input_boolean.kallen_overnight'].state\nconst motion = states['binary_sensor.upstairs_bathroom_motion'].state\nconst payload = msg.payload\n\nlet timerCancel = {\n \"payload\": \"stop\"\n}\n\nlet scene = {}\nif (payload === 'on') {\n scene = 'Bright'\n} else {\n if (motion === 'on') {\n scene = 'Adaptive'\n } else {\n scene = 'Single Nightlight'\n }\n}\n\nif (payload === 'on') {\n msg.scene = scene\n node.status({fill:'green',shape:'dot',text:'Shower Mode On'})\n node.send([timerCancel,msg,null])\n} else if (payload === 'off') {\n node.send([timerCancel,null,null])\n if (motion === 'on') {\n msg.scene = scene\n node.status({fill:'green',shape:'dot',text:'Lights Adaptive'})\n node.send([null,msg,null])\n } else if (earlyNightMode === 'on') {\n if (kallenOvernight === 'on') {\n node.status({fill:'green',shape:'dot',text:'Lights Off'})\n node.send([null,null,msg])\n } else {\n msg.scene = scene\n node.status({fill:'green',shape:'dot',text:'Scene Set'})\n node.send([null,msg,null])\n }\n } else {\n node.status({fill:'green',shape:'dot',text:'Lights Off'})\n node.send([null,null,msg])\n }\n}\n\nnode.log(\"----- Upstairs Bathroom Shower Mode Parameters Start -----\")\nnode.log(\"Upstairs Bathroom payload: \" + payload)\nnode.log(\"Upstairs Bathroom scene: \" + scene)\nif (payload === 'off') {\n node.log(\"Upstairs Bathroom occupied: \" + occupied)\n node.log(\"Upstairs Bathroom earlyNightMode: \" + earlyNightMode)\n node.log(\"Upstairs Bathroom nightMode: \" + nightMode)\n node.log(\"Upstairs Bathroom kallenOvernight: \" + kallenOvernight)\n node.log(\"Upstairs Bathroom motion: \" + motion)\n}\nnode.log(\"----- Upstairs Bathroom Shower Mode Parameters End -----\")",
"outputs": 3,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 640,
"wires": [
[
"a1fa2d2d1f55af4b"
],
[
"2ad7be43ccdbdeaf",
"31b8c8291d19ffc6"
],
[
"ea02f8930aa2c7aa"
]
],
"outputLabels": [
"Cancel Timer",
"Set Scene",
"Lights Off"
]
},
{
"id": "5e00ecbccbe51462",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "function 13",
"func": "const payload = msg.payload\n\nif (payload === 'stop') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Timer Stopped\"})\n} else {\n node.log(\"Upstairs Bathroom 2-minute timer started\")\n node.log(\"Upstairs Bathroom 2-minute timer payload: \" + payload)\n node.status({fill:\"red\",shape:\"ring\",text:\"Message Logged\"})\n} \n\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1215,
"y": 520,
"wires": [
[
"2dc5f9d3e00f4ddc"
]
],
"l": false
},
{
"id": "76423fc24fedb52c",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Settings",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst earlyNightMode = states['binary_sensor.early_night_mode'].state\nconst nightMode = states['input_boolean.night_mode'].state\nconst goodnight = states['input_boolean.goodnight'].state\nconst masterBedroomSleep = states['input_boolean.master_bedroom_sleeping'].state\nconst kallenBedroomSleep = states['input_boolean.kallen_sleeping'].state\nconst peopleSleeping = (masterBedroomSleep === 'on' || kallenBedroomSleep === 'on')\n\nlet hallwayScene = {}\nlet hallwayAction = {}\n\nif (goodnight === 'on' || peopleSleeping === true) {\n hallwayAction = 'off'\n} else if (earlyNightMode === 'on' || nightMode === 'on') {\n hallwayAction = 'on'\n hallwayScene = 'Nightlight'\n} else {\n hallwayAction = 'off'\n}\n\nmsg.hallway = hallwayAction\n\n// Turn off Stairwell LED Strip\nnode.send([null,null,msg])\n\n// Hallway actions\nif (hallwayAction === 'on') {\n msg.scene = hallwayScene\n node.status({fill:'green',shape:'dot',text:'Hallway ' + hallwayScene})\n node.send([msg,null,null])\n} else if (hallwayAction === 'off') {\n node.status({fill:'green',shape:'dot',text:'Hallway Off'})\n node.send([null,msg,null])\n}",
"outputs": 3,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 980,
"wires": [
[
"b05b87a1e43f11f9"
],
[
"48c5c102461f0981"
],
[
"f18aab5a5bda9a84"
]
],
"outputLabels": [
"Scene",
"Hallway",
"Stairwell"
]
},
{
"id": "48c5c102461f0981",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Hallway On/Off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_{{hallway}}",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.hallway_overhead"
],
"labelId": [],
"data": "{}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_{{hallway}}",
"x": 540,
"y": 980,
"wires": [
[]
]
},
{
"id": "b05b87a1e43f11f9",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Hallway Scene",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_hallway_scenes"
],
"labelId": [],
"data": "{\t \"option\": scene\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 540,
"y": 920,
"wires": [
[]
]
},
{
"id": "ef677459c795d246",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Goodnight",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_boolean.goodnight"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 100,
"y": 1100,
"wires": [
[
"1f1489a0514e233b"
]
]
},
{
"id": "1f1489a0514e233b",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "f16f28689b7ec2b4",
"name": "Sleep Mode",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "switch.turn_{{payload}}",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_stairwell"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "switch",
"service": "turn_{{payload}}",
"x": 530,
"y": 1100,
"wires": [
[]
]
},
{
"id": "f3824e4c7e202605",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.kallen_bedroom_lights"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 1390,
"y": 980,
"wires": [
[]
]
},
{
"id": "4954c509d4d697e2",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Delay",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst lights = states['light.kallen_bedroom_lights'].state\nconst duration = states['input_number.kallen_bedroom_lights_off_delay'].state\nconst lux = parseInt(states['sensor.kallen_bedroom_illuminance'].state)\nconst threshold = parseInt(states['input_number.kallen_bedroom_lux_threshold'].state)\nconst kallenBedroomSleep = states['input_boolean.kallen_sleeping'].state\nconst masterBedroomSleep = states['input_boolean.master_bedroom_sleeping'].state\nconst peopleSleeping = (masterBedroomSleep === 'on' || kallenBedroomSleep === 'on')\nconst payload = msg.payload\nconst newDuration = duration * 60\n\nif (peopleSleeping === false) {\n if (payload === 'on') {\n if (lux <= threshold && lights === 'off') {\n node.status({fill:'green',shape:'dot',text:'Turning lights on'})\n node.send([msg,msg,null])\n } else {\n if (lights === 'on') {\n node.status({fill:'red',shape:'ring',text:'Lights already on'})\n node.send([null,msg,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Too bright'})\n }\n }\n } else if (payload === 'off') {\n if (lights === 'on') {\n msg.duration = newDuration\n node.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'})\n node.send([null,null,msg])\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Lights already off\"})\n }\n }\n} else {\n node.status({fill:'red',shape:'ring',text:'Blocked (Sleeping)'})\n}",
"outputs": 3,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1130,
"y": 860,
"wires": [
[
"5524e8ba9b5545be"
],
[
"bbe9fd4eff4e6a04"
],
[
"9a8f53db7d3ed3b7"
]
],
"outputLabels": [
"Lights On",
"Cancel Timer",
"Start Timer"
],
"icon": "node-red/timer.svg"
},
{
"id": "9a8f53db7d3ed3b7",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_bedroom_motion_timer"
],
"labelId": [],
"data": "{ \t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 1390,
"y": 920,
"wires": [
[]
]
},
{
"id": "bbe9fd4eff4e6a04",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_bedroom_motion_timer"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 1390,
"y": 860,
"wires": [
[]
]
},
{
"id": "f6aca47ad4719dab",
"type": "server-events",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.kallen_bedroom_motion_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 980,
"y": 980,
"wires": [
[
"0b5424aadc3479f7"
]
]
},
{
"id": "1a63ea711d6658b2",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Motion Sensor",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "5053909a498e0d02",
"entities": {
"entity": [
"binary_sensor.kallen_bedroom_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 970,
"y": 860,
"wires": [
[
"4954c509d4d697e2"
]
],
"outputLabels": [
"on"
]
},
{
"id": "0b5424aadc3479f7",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Sleep Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.kallen_sleeping",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1190,
"y": 980,
"wires": [
[
"f3824e4c7e202605"
],
[]
]
},
{
"id": "5524e8ba9b5545be",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "5c1df7492351b925",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_bedroom_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 1380,
"y": 800,
"wires": [
[]
]
},
{
"id": "e270c73896a1a50c",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.master_bedroom_lights"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 1390,
"y": 1260,
"wires": [
[]
]
},
{
"id": "3063e6a5b5c3f677",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Delay",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst lights = states['light.master_bedroom_lights'].state\nconst duration = states['input_number.master_bedroom_lights_off_delay'].state\nconst lux = parseInt(states['sensor.master_bedroom_illuminance'].state)\nconst threshold = parseInt(states['input_number.master_bedroom_lux_threshold'].state)\nconst masterBedroomSleep = states['input_boolean.master_bedroom_sleeping'].state\nconst kallenBedroomSleep = states['input_boolean.kallen_sleeping'].state\nconst peopleSleeping = (masterBedroomSleep === 'on' || kallenBedroomSleep === 'on')\nconst nightMode = states['input_boolean.night_mode'].state\nconst payload = msg.payload\nconst newDuration = duration * 60\n\nif (peopleSleeping === false && nightMode === 'off') {\n if (payload === 'on') {\n if (lux <= threshold && lights === 'off') {\n node.status({fill:'green',shape:'dot',text:'Turning lights on'})\n node.send([msg,msg,null])\n } else {\n if (lights === 'on') {\n node.status({fill:'red',shape:'ring',text:'Lights already on'})\n node.send([null,msg,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Too bright'})\n }\n }\n } else if (payload === 'off') {\n if (lights === 'on') {\n msg.duration = newDuration\n node.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'})\n node.send([null,null,msg])\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Lights already off\"})\n }\n }\n} else {\n node.status({fill:'red',shape:'ring',text:'Blocked (Sleeping)'})\n}",
"outputs": 3,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1130,
"y": 1140,
"wires": [
[
"81129efa6676b58e"
],
[
"f14572686bbbbf9e"
],
[
"31686303c43971c7"
]
],
"outputLabels": [
"Lights On",
"Cancel Timer",
"Start Timer"
],
"icon": "node-red/timer.svg"
},
{
"id": "31686303c43971c7",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.master_bedroom_motion_timer"
],
"labelId": [],
"data": "{ \t \"duration\": duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "start",
"x": 1390,
"y": 1200,
"wires": [
[]
]
},
{
"id": "f14572686bbbbf9e",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.master_bedroom_motion_timer"
],
"labelId": [],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "timer",
"service": "cancel",
"x": 1390,
"y": 1140,
"wires": [
[]
]
},
{
"id": "602869aebc96184c",
"type": "server-events",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.master_bedroom_motion_timer\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 980,
"y": 1260,
"wires": [
[
"4a431478798a51c8"
]
]
},
{
"id": "cfb6cf1f5f583447",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Motion Sensor",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "9a5af08b3c421d41",
"entities": {
"entity": [
"binary_sensor.master_bedroom_motion"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "detect",
"propertyType": "msg",
"value": "motion",
"valueType": "str"
}
],
"x": 970,
"y": 1140,
"wires": [
[
"3063e6a5b5c3f677"
]
],
"outputLabels": [
"on"
]
},
{
"id": "4a431478798a51c8",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Sleep Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.master_bedroom_sleeping",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1190,
"y": 1260,
"wires": [
[
"e270c73896a1a50c"
],
[]
]
},
{
"id": "81129efa6676b58e",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "505e378279011759",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.master_bedroom_scenes"
],
"labelId": [],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 1380,
"y": 1080,
"wires": [
[]
]
},
{
"id": "b26bc471bcac2653",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "c1e37f193ee65d73",
"name": "Auto Shower Mode",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst showerMode = states['input_boolean.shower_mode'].state\nconst tempChange = parseFloat(msg.payload)\n\nlet action = {}\n\nif (tempChange < 0) {\n action = 'off'\n} else if (tempChange >= 5.0) {\n action = 'on'\n} else {\n action = 'none'\n}\n\nlet actionMsg = {\n 'action': 'turn_' + action\n}\n\nif ((action === 'on' && showerMode === 'off') || (action === 'off' && showerMode === 'on')) {\n node.status({fill:'green',shape:'dot',text:'Shower Mode ' + action})\n node.send(actionMsg)\n} else {\n node.status({fill:'red',shape:'ring',text:'No action taken'})\n return null\n}",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1030,
"y": 60,
"wires": [
[
"646ac99f62432e22"
]
]
},
{
"id": "b51f19fa5b3d1587",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "c1e37f193ee65d73",
"name": "Temp Change",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "48a08ecc20e474e9",
"entities": {
"entity": [
"sensor.upstairs_bathroom_temp_change"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "num",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "temp-change",
"valueType": "str"
}
],
"x": 770,
"y": 60,
"wires": [
[
"b26bc471bcac2653"
]
]
},
{
"id": "646ac99f62432e22",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "c1e37f193ee65d73",
"name": "Turn on/off",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "input_boolean.{{action}}",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.shower_mode"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "{{action}}",
"x": 1250,
"y": 60,
"wires": [
[]
]
},
{
"id": "0367216416de8b4d",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Door",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "9643a7993e266372",
"entities": {
"entity": [
"binary_sensor.emma_bedroom_door"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "door",
"valueType": "str"
}
],
"x": 90,
"y": 1440,
"wires": [
[
"03075516f3003707"
]
]
},
{
"id": "03075516f3003707",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Door Alert",
"func": "const states = global.get('homeassistant.homeAssistant.states')\nconst masterBedroomSleeping = states['input_boolean.master_bedroom_sleeping'].state\nconst emmaSleep = states['input_boolean.emma_sleeping'].state\nconst tonyAwake = states['input_boolean.tony_awake'].state\nconst xiaDesktopUser = states['sensor.xia_desktop_current_username'].state\nconst xiaDesktopIdle = states['binary_sensor.tina_desktop_idle'].state\nconst tonyLocation = states['person.tony_stork'].state\nconst tinaLocation = states['person.christina_stork'].state\nconst overnight = states['binary_sensor.overnight'].state\nconst payload = msg.payload\nconst topic = msg.topic\n\n// Set some default values\n\nlet who = 'Alexa Everywhere' // Default to playing on all Echo Dots unless told otherwise\nlet tinaAvailable = false\nlet tonyAvailable = false\nlet enable = false\nlet reason = {}\n\n// Determine who is available to respond\n\nif (tonyAwake === 'on' && tonyLocation === 'home') {\n tonyAvailable = true\n}\n\nif (xiaDesktopUser === 'irish' && xiaDesktopIdle === 'off' && tinaLocation === 'home') {\n tinaAvailable = true\n}\n\n// If both of us are still asleep, or I am asleep and she is at work, play the alert only in the master bedroom\n\nif (tinaAvailable === false && tonyAvailable === false) {\n who = 'Master Bedroom'\n}\n\n// Determine if the alert should be sent\n\nif (emmaSleep === 'on') {\n if (overnight === 'on' && masterBedroomSleeping === 'on') {\n enable = true\n reason = 'Overnight is on, and master bedroom is sleeping'\n } else if (overnight === 'off') {\n enable = true\n reason = 'Overnight is off'\n }\n}\n\n// Define the alert message\n\nlet alertTTS = {\n \"topic\": who,\n \"payload\": \"Emma has opened her door, please check on her. I repeat, Emma has opened her door, please check on her. This is urgent, Emma is awake. PDS toddler warning, a large and extremely dangerous toddler is on the ground in your area.\",\n \"type\": \"critical\"\n}\n\n// Add some logs for debugging\n\nnode.log(`--------------- Emma Door Alert --------------`)\nnode.log(`Emma Door Alert - topic: ${topic}`)\nnode.log(`Emma Door Alert - payload: ${payload}`)\nnode.log(`Emma Door Alert - masterBedroomSleeping: ${masterBedroomSleeping}`)\nnode.log(`Emma Door Alert - emmaSleep: ${emmaSleep}`)\nnode.log(`Emma Door Alert - tonyAwake: ${tonyAwake}`)\nnode.log(`Emma Door Alert - xiaDesktopUser: ${xiaDesktopUser}`)\nnode.log(`Emma Door Alert - xiaDesktopIdle: ${xiaDesktopIdle}`)\nnode.log(`Emma Door Alert - tonyLocation: ${tonyLocation}`)\nnode.log(`Emma Door Alert - tinaLocation: ${tinaLocation}`)\nnode.log(`Emma Door Alert - overnight: ${overnight}`)\nnode.log(`Emma Door Alert - tonyAvailable: ${tonyAvailable}`)\nnode.log(`Emma Door Alert - tinaAvailable: ${tinaAvailable}`)\nnode.log(`Emma Door Alert - who: ${who}`)\nnode.log(`Emma Door Alert - enable: ${enable}`)\nnode.log(`Emma Door Alert - reason: ${reason}`)\nnode.log(`----------------------------------------------`)\n\n// Send the alert if conditions are met\n\nif (topic === 'door' && payload === 'on') {\n if (enable === true) {\n node.status({fill:'green',shape:'dot',text:`Sending alert to ${who}`})\n node.send([alertTTS,msg,null])\n } else {\n node.status({fill:'red',shape:'ring',text:'Door Opened, but no alert sent'})\n }\n} else if (topic === 'timer') {\n node.status({fill:'green',shape:'dot',text:'Timer Finished'})\n node.send([alertTTS,msg,null])\n} else if (topic === 'cancel') {\n node.status({fill:'green',shape:'dot',text:'Cancel Button Pressed'})\n node.send([null,null,msg])\n} else if (topic === 'door' && payload === 'off') {\n node.status({fill:'green',shape:'dot',text:'Door Closed'})\n}",
"outputs": 3,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 1500,
"wires": [
[
"2e356bc6f1ad80dc"
],
[
"c9d498c1e323b1e4"
],
[
"515f7471cec7bce2"
]
],
"outputLabels": [
"TTS Output",
"Start Timer",
"Cancel Timer"
]
},
{
"id": "2e356bc6f1ad80dc",
"type": "subflow:6429099c4571dd6b",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "",
"x": 540,
"y": 1440,
"wires": [
[]
]
},
{
"id": "c9d498c1e323b1e4",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.start",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.emma_door_alert"
],
"labelId": [],
"data": "{\"duration\":\"00:00:30\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "timer",
"service": "start",
"x": 530,
"y": 1500,
"wires": [
[]
]
},
{
"id": "f7bd6d5fabdba0e0",
"type": "server-events",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 3,
"exposeAsEntityConfig": "",
"eventType": "timer.finished",
"eventData": "{\"entity_id\":\"timer.emma_door_alert\"}",
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
},
{
"property": "topic",
"propertyType": "msg",
"value": "timer",
"valueType": "str"
}
],
"x": 120,
"y": 1500,
"wires": [
[
"03075516f3003707"
]
]
},
{
"id": "515f7471cec7bce2",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "timer.cancel",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"timer.emma_door_alert"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "timer",
"service": "cancel",
"x": 530,
"y": 1560,
"wires": [
[
"40dae72402f8cdee"
]
]
},
{
"id": "ca85b450d07da81c",
"type": "ha-button",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Cancel Button",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "7d7c641acaff9284",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "cancel",
"valueType": "str"
}
],
"x": 110,
"y": 1560,
"wires": [
[
"03075516f3003707"
]
]
},
{
"id": "40dae72402f8cdee",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Volume Reset",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.volume_reset",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "script",
"service": "volume_reset",
"x": 720,
"y": 1560,
"wires": [
[]
]
},
{
"id": "bb3469b3ec117aab",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "ba738e13229c781b",
"name": "Sleep Off",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_boolean.emma_sleeping"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "off",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "cancel",
"valueType": "str"
}
],
"x": 100,
"y": 1620,
"wires": [
[
"03075516f3003707"
],
[]
]
},
{
"id": "07049ae77b6751c6",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "a60d1c8190059645",
"name": "Basement Studio Scenes",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_select.basement_studio_scenes"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "basement_studio",
"valueType": "str"
}
],
"x": 150,
"y": 60,
"wires": [
[
"31c254f61982f19d"
]
]
},
{
"id": "5e31d6aacad206b8",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "d00eb21154ac4160",
"name": "Light turned on",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"light.furnace_room_overhead"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 740,
"y": 60,
"wires": [
[
"dd3608c864d7007b"
],
[]
]
},
{
"id": "18599ab162ab225b",
"type": "change",
"z": "47f17992fab9b4f5",
"g": "d00eb21154ac4160",
"name": "Stop Timer",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "stop",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 930,
"y": 120,
"wires": [
[
"dd3608c864d7007b"
]
]
},
{
"id": "dd3608c864d7007b",
"type": "stoptimer",
"z": "47f17992fab9b4f5",
"g": "d00eb21154ac4160",
"duration": "60",
"units": "Minute",
"payloadtype": "num",
"payloadval": "0",
"name": "",
"x": 1140,
"y": 60,
"wires": [
[
"e79ecc6c79946cc4"
],
[]
]
},
{
"id": "e79ecc6c79946cc4",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "d00eb21154ac4160",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.furnace_room_overhead"
],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"output_location": "",
"output_location_type": "none",
"x": 1330,
"y": 60,
"wires": [
[]
]
},
{
"id": "ab01d3d95c7ea717",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "d00eb21154ac4160",
"name": "Light turned off",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"light.furnace_room_overhead"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "off",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 740,
"y": 120,
"wires": [
[
"18599ab162ab225b"
],
[]
]
},
{
"id": "8fa363e9e0c1b165",
"type": "comment",
"z": "47f17992fab9b4f5",
"g": "d00eb21154ac4160",
"name": "Furnace Room",
"info": "",
"x": 940,
"y": 60,
"wires": []
},
{
"id": "97a441f1ac510844",
"type": "inject",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 240,
"y": 220,
"wires": [
[
"3c83c0ab0aa96e3d"
]
]
},
{
"id": "fbe3667814a51f6f",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Front Door Opens",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.front_door"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 210,
"y": 280,
"wires": [
[
"3c83c0ab0aa96e3d"
],
[]
]
},
{
"id": "ec543bc9adac3d08",
"type": "api-current-state",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Basement Lights On?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "light.basement_studio_lights",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 620,
"y": 280,
"wires": [
[
"981191938ab4ee2f"
],
[]
]
},
{
"id": "d4019d35bf5a5f98",
"type": "inject",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 240,
"y": 400,
"wires": [
[
"7b71cb1967ec5255"
]
]
},
{
"id": "25e12d8e4a0a7f11",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Doorbell Rings",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.front_doorbell_ding_mqtt"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 200,
"y": 460,
"wires": [
[
"7b71cb1967ec5255"
],
[]
]
},
{
"id": "e91c3392b59ff9d1",
"type": "api-current-state",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Basement Lights On?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "light.basement_studio_lights",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 620,
"y": 460,
"wires": [
[
"59af14a564176ce4"
],
[]
]
},
{
"id": "981191938ab4ee2f",
"type": "api-current-state",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Studio Quiet?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.studio_quiet",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 840,
"y": 280,
"wires": [
[
"03fad0a960ff39e7"
],
[]
]
},
{
"id": "59af14a564176ce4",
"type": "api-current-state",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Studio Quiet?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.studio_quiet",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 840,
"y": 460,
"wires": [
[
"c0933fcc8737bc0b"
],
[]
]
},
{
"id": "3c83c0ab0aa96e3d",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Save State",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "scene.create",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"scene_id\":\"basement_restore\",\t \"snapshot_entities\":[\"light.basement_led_strip_1\",\"light.basement_tall_lamp\",\"light.basement_short_lamp\",\"light.basement_stairwell\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "scene",
"service": "create",
"x": 410,
"y": 280,
"wires": [
[
"ec543bc9adac3d08"
]
]
},
{
"id": "7b71cb1967ec5255",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Save State",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "scene.create",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"scene_id\":\"basement_restore\",\t \"snapshot_entities\":[\"light.basement_led_strip_1\",\"light.basement_tall_lamp\",\"light.basement_short_lamp\",\"light.basement_stairwell\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "scene",
"service": "create",
"x": 410,
"y": 460,
"wires": [
[
"e91c3392b59ff9d1"
]
]
},
{
"id": "1f5808147fa975cf",
"type": "link in",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Basement On - iOS",
"links": [
"572b2040be874f4e"
],
"x": 135,
"y": 940,
"wires": [
[
"ea5306d6f92d9550",
"d6e7197427bb4d1b",
"bd6bdc6ed9aded9d",
"3bd0a22c66de228a"
]
]
},
{
"id": "1966d10d8f4467c7",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Alexa Button",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"input_button.basement_on"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "alexa",
"valueType": "str"
}
],
"x": 190,
"y": 880,
"wires": [
[
"0c7ef72bd0ef47d4"
]
]
},
{
"id": "a9bc78f321149316",
"type": "ha-button",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Manual Button",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "23e5e32354cf867a",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "manual",
"valueType": "str"
}
],
"x": 190,
"y": 1120,
"wires": [
[
"ea5306d6f92d9550",
"d6e7197427bb4d1b",
"bd6bdc6ed9aded9d",
"3bd0a22c66de228a"
]
]
},
{
"id": "b3bb08ff51e46985",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"d": true,
"g": "550e5b2d99316b12",
"name": "Alexa Actionable Notification",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.activate_alexa_actionable_notification",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"text\": \"
\", \" \")\nstr = str.replaceAll(\"
\", \" \")\nstr = str.replaceAll(\">\", \" \")\nstr = str.replaceAll(\"