Files
HA-NerdFlows/flows.json

26912 lines
714 KiB
JSON

[
{
"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": "Lighting - First Floor",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5e238cbbe6d612c9",
"type": "tab",
"label": "Lighting - Second Floor",
"disabled": false,
"info": "",
"env": []
},
{
"id": "47f17992fab9b4f5",
"type": "tab",
"label": "Lighting - Basement",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b5717a86ce55bc29",
"type": "tab",
"label": "Outdoor Lighting",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b0286fae9f2ce547",
"type": "tab",
"label": "Media Scenes - Living Room",
"disabled": false,
"info": "",
"env": []
},
{
"id": "72f99805df043603",
"type": "tab",
"label": "Climate",
"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": "ebd5561c4f077718",
"type": "tab",
"label": "Weather",
"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": "",
"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": 720,
"y": 40,
"wires": [
{
"id": "011c7df420cc7f1a",
"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": 1560,
"y": 500,
"wires": [
{
"id": "6ae79d1701e78840",
"port": 0
},
{
"id": "defe84d113029e8e",
"port": 0
}
]
}
},
{
"id": "74d3a55b70dc2d6c",
"type": "subflow",
"name": "Basement Scenes Handler",
"info": "",
"category": "",
"in": [
{
"x": 60,
"y": 300,
"wires": [
{
"id": "622b8178adf9d4a8"
}
]
}
],
"out": [],
"env": [],
"meta": {},
"color": "#DDAA99",
"icon": "node-red-contrib-huemagic/hue-scene.svg",
"status": {
"x": 1340,
"y": 440,
"wires": [
{
"id": "5c8b0b6fa5c68af6",
"port": 0
}
]
}
},
{
"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": "eccca853a916b662",
"type": "group",
"z": "5e238cbbe6d612c9",
"name": "Upstairs Bathroom Motion Lights",
"style": {
"label": true
},
"nodes": [
"a1ee07ab20229b45",
"74c0ced4ac160364",
"ea8536fc853a8af4",
"d2df58b074b9ba08",
"e19f97e448023ade",
"38d9a4979f22e19f",
"d0cf87bd9c3ba0b1",
"83686fab02a3d825",
"853abef16fadc824",
"bfcb013bbf11611c",
"785049971f40b7b2",
"2ad7be43ccdbdeaf",
"2e299ac73c696afc",
"5d18c5d00181b011",
"ea02f8930aa2c7aa",
"8859759915625e2f",
"3941b4a5b3493461",
"0b122b02cfb10c25",
"d1ae15dff680b3b1",
"39b90ceaed170ac8",
"31b8c8291d19ffc6",
"34e2055344eea8fe",
"55e84ccb73ae9b74",
"3a25dfcae623ee00",
"fc4bcd1c117fa849",
"017de174925e8c75",
"2d510442b2e79794",
"2dc5f9d3e00f4ddc",
"86922621398f4b79",
"4888e5649042a6d1",
"73bf42069fe27d3a",
"32559cd9120b4916",
"a1fa2d2d1f55af4b",
"463689442b9d2046",
"5350d2264880d0ad",
"1d03ecbe4448d224",
"da70285e80c3f195",
"a7a59e2f845b849c",
"37f1c11c59a6ce16"
],
"x": 94,
"y": 339
},
{
"id": "39a7ac02f2727f1d",
"type": "group",
"z": "72f99805df043603",
"name": "Kallen Bedroom",
"style": {
"label": true
},
"nodes": [
"d5784e5baa80a105",
"9e1418c3e9595312",
"99e74844b8fd9d1a",
"6418c17768ed363d",
"2f3666d288d77ad1",
"265b54394cc42f53",
"d132875202e85038",
"a6f4af0aaabcc2c1",
"57651381835f659c",
"acb52adc50d34045",
"e0751f3bf2a2e610",
"b4dbbf788c5a30d2",
"d6b56cb65c2ff140",
"e32aaeb51d3f2e95",
"90329b0683f81550",
"43ea4107912bf0f2",
"11993e61de14f592",
"308fce46bd959bce",
"4341325f7ca23f24",
"1c98de289e42377f",
"61405a43f61f3d60",
"af209a80e9174433",
"274d63b8df8f2dd0",
"62211bf089bc5b04",
"d0dacbae4513b1ad",
"7b390a3b24fc3197",
"a417e93366843249",
"b371dfa2ee57b577"
],
"x": 14,
"y": 719,
"w": 1432,
"h": 582
},
{
"id": "e065b1ed4938b477",
"type": "group",
"z": "72f99805df043603",
"name": "Master Bedroom",
"style": {
"label": true
},
"nodes": [
"8e399b2a287a0905",
"314752dbc6fd170d",
"d7261338e6b907f1",
"6fb7131d5534350c",
"fd0a309681a536de",
"40dc1e930b887eb7",
"bf1b0d6542ef6b38",
"24c3166123d5dad0",
"40f52ef656550cf6",
"b14bcbf98b7e9f91",
"e473da127624f191",
"ed6649edf0128951",
"20f407c978d14863",
"36c671c1520680e7",
"efe1917ebdcef673",
"444acaf315688ac9",
"dc440dfc78c41b8a",
"1aa901d26ce8ac46",
"21001f5409130f44",
"bc592ba259667f9d",
"1f7ac875e593d434",
"9179e99207e9f8f3",
"404c42d6fea46839",
"7a7f626dce181b23",
"f541ad53e32f703b",
"66e85878d60c7d65",
"bcba065aa5ecb2be",
"10d9b30654ef759c",
"0a783dc1cb68b4bf",
"11ed2afea8133e8f",
"be70ec3d9b852b89",
"6c06c2eec1583c66",
"0c680585239e7f60",
"e2581a5f3f4888df",
"1dfb0bcc98f1457b",
"096369136e9e607f",
"783cfb381b70afc5",
"5008caa0192238f7",
"09a31110ed0a8630",
"0f6d425791646818",
"bc9d4a0d7a7c5c79",
"67509a5554fc091f",
"1eb13d819ba7e226",
"a10629857d60f774",
"e2ad91fc748ca519",
"a3ef2faca9922113",
"a8ef744455bb4c0a",
"6ed7feb3956038ed",
"4a1db30e164dadc8",
"9c01880c6319d29b",
"96f6dcaa16f8ee6f",
"1967e5238d3aa5a1",
"f8cc9d6657bff329"
],
"x": 14,
"y": 19,
"w": 2112,
"h": 682
},
{
"id": "5c50443a84910fb7",
"type": "group",
"z": "3e4ba157b540d183",
"name": "Tina Schedule Management",
"style": {
"label": true
},
"nodes": [
"4d724735025b0ed8",
"6ec62f6cf4fcf994",
"71bee01e93d372c4",
"31ce8ad28dd41226",
"20271b0662a4d5df",
"69886cf636bf4f70",
"16bf625c802d7910",
"39f78e9aa56bc51e",
"a32c37ccf0102258",
"d5c6b45df763e57e",
"6f011420f6bb15a7",
"74bb3d48dd17bef9",
"486bca43ddc48fb8"
],
"x": 34,
"y": 159
},
{
"id": "477e752fcd2e2a19",
"type": "group",
"z": "ee67610b4a0578d2",
"name": "House Announcement System",
"style": {
"label": true
},
"nodes": [
"a4c477269b22f766",
"9cafa6212280b2d5",
"5095d45c90d5304f",
"3ae21589dd88c080",
"93b7bee28a7e896e",
"b2bc83c9195efe0f",
"f4bfbaca4d7fb1df"
],
"x": 14,
"y": 39
},
{
"id": "50e4d951ee7b3e54",
"type": "group",
"z": "ee67610b4a0578d2",
"name": "Report System",
"style": {
"label": true
},
"nodes": [
"f803c6af3a30eb66",
"3bd7704103dbfc20",
"a6234b2047ba3116",
"788eb0a1551db9b8",
"7674185d1e5ee489",
"427cc2991454bbf0",
"3c03edd9c35f85f8"
],
"x": 14,
"y": 199
},
{
"id": "fbbe69a14cbe0236",
"type": "group",
"z": "ffa6a885ac41a5ed",
"name": "Sensors",
"style": {
"label": true
},
"nodes": [
"c2972c7728c99c43",
"bc09f451754ba126",
"fdefcd6a64aa9bca",
"da305ace22579c07",
"7ecdec08d9698a19",
"1b5678e80095a461",
"c88179f1facb8646",
"7af97720032b4609",
"08aadf619537949e",
"a0adec284cd8162a",
"46e0046a27f4bc89",
"a6038f6bd028bd2f",
"d5c7d4f4714a6cd6",
"d1ac8b45d7baa4ed",
"35847fc20196c4ce",
"c002b47a53a0e203",
"0008fb5b70ae6aea",
"a46a88d4fb03cceb",
"8d26310ed06bb045",
"67119024666b68bd",
"e235145192886939",
"b0fee451dea6b00c",
"adc20601e249dc44",
"ea300ecd15cbc07f",
"4f0c3e053e317dbc",
"bdd8715ce3cc4713",
"9b66a631492c2023",
"c0813ccdec033370",
"d681fa96683511c1",
"e5cc046624cd5453",
"7ffbdab6daa40cd9",
"d00db0647d1c4034",
"7e733e83ceaef1f9",
"2d43bf0d5590f6bb",
"febc179b34c8cf71"
],
"x": 34,
"y": 39
},
{
"id": "46275dd0f9461013",
"type": "group",
"z": "ffa6a885ac41a5ed",
"name": "Functionality",
"style": {
"label": true
},
"nodes": [
"b109c8db1c2cd259",
"75a50e8dac7af692",
"baae5d6f53900594",
"619d1474239faf58",
"ca88f85ba00a6744"
],
"x": 34,
"y": 739
},
{
"id": "ff6d8150e8d5e606",
"type": "group",
"z": "b0286fae9f2ce547",
"name": "Entertainment Mode",
"style": {
"label": true
},
"nodes": [
"7611921cadb91b1e",
"3a29cecbefa6cbe2",
"4a2031f363418db1",
"984386fa0a6369d6",
"0beae13503166379",
"6c77ade442a47a30",
"6392f2f0586d988a",
"e505e9f24bf919dd",
"9efd5346a1ca1972",
"8b53b9f4d5ba0bf0",
"cc8f6ab710549be2",
"346379575efad516",
"8b0b39deb5142557",
"7cb8056b3b41a9e8"
],
"x": 34,
"y": 779
},
{
"id": "f55a52c40b8b8749",
"type": "group",
"z": "b0286fae9f2ce547",
"name": "Buttons, Alexa Calls",
"style": {
"label": true
},
"nodes": [
"cd04bdb407311eb5",
"cac7cc3111526a67",
"7d8d5376e990d357",
"ab4c69753bfc36f5",
"b18c7a21fc449d35",
"936091f71dc880b3",
"59350a1f38e3e04a",
"6c78852a9c604f64",
"abe997d5df095480",
"a18b6c8c026995d6",
"db54e97573a07fc4",
"77f2aae15fa1250d",
"9e36b04d6063c234",
"7f82b9d6d835e09b",
"158b197a42fed757",
"e549712aaaceb285",
"be5bdfc3c12b05da",
"728ab818393de52d",
"960884b0fd23e69b",
"61fdabfde220fbcc",
"42b706dd4afe3e42",
"9a605b80513eba44",
"0b860dc2f7db3ba0",
"51d86d6064f084d2",
"31cb558d6ee383c4",
"0b79d297a8596c37",
"13d5c047c41f60ba",
"40817f8c9eeae5fe",
"b8995a85f5d34268",
"85bd556a614f0455",
"c95d487f9fbe14ce",
"318bee4424125dd5"
],
"x": 34,
"y": 19
},
{
"id": "208284848b13b85b",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Front Door Awareness",
"style": {
"label": true
},
"nodes": [
"97a441f1ac510844",
"d45ac7361e128558",
"fbe3667814a51f6f",
"ec543bc9adac3d08",
"3563f62312975002",
"d4019d35bf5a5f98",
"29b9f573370571cf",
"25e12d8e4a0a7f11",
"e91c3392b59ff9d1",
"753ad45c3685897b",
"d32a407e1c701563",
"58b54517ed812db3",
"981191938ab4ee2f",
"59af14a564176ce4",
"3c83c0ab0aa96e3d",
"1a7c87f9713e5349",
"7b71cb1967ec5255",
"1e1891c23a6e7e64"
],
"x": 34,
"y": 239
},
{
"id": "1ca205a84922c8c2",
"type": "group",
"z": "4a8821853d4dd1ad",
"name": "Finish",
"style": {
"label": true
},
"nodes": [
"923538ef97772f0c",
"a3e3dc438a7b95fc",
"fe1ba086baf93ec0",
"50056b099a24a824",
"d8e2d16e313b938a",
"b0c92a72557d0ac6",
"408795055634e897",
"0a441953c41a18ae",
"08a22fa71fce5e91",
"d580c539c554a4c1",
"f0cc7b3b9622312a",
"e9e8bc8b535c232f",
"206e512c5268020f",
"4da18a3f1e0298db"
],
"x": 34,
"y": 559,
"w": 1012,
"h": 382
},
{
"id": "5595964c8367c984",
"type": "group",
"z": "ee67610b4a0578d2",
"name": "Text Notification System",
"style": {
"label": true
},
"nodes": [
"98626a8f2b59bde3",
"47bc783fd78f5aa8",
"db6d955c039873be",
"d2fec32d385dae8c",
"0145961e8276c53e",
"fd623c46a558a01a",
"c52cae79eb97bcc0",
"6b039ef7895476e2",
"f44427c5a493c428"
],
"x": 14,
"y": 359
},
{
"id": "eeafd13be593ae69",
"type": "group",
"z": "b5717a86ce55bc29",
"name": "Front Porch Light Timer",
"style": {
"label": true
},
"nodes": [
"091390f43bfeddf5",
"7a7229eb69c9b1a3",
"f34816b23181f21e",
"de4f1b15ce906809",
"bd75b077a1c76fce",
"b69eeb738bbd4bdb",
"cfdcc7c9c168dc17",
"16029ccf061bdd10",
"d2751bc2cfc5af8f",
"435280acadb9f364",
"ec5937bc60874009",
"defcae57f9916394",
"459433738b64d14d",
"a2ec35a79d79bf2f",
"9a8c39dc1a0c20e6",
"8c29a2e1a06c5524",
"c7a8df4ebeb3b5c5",
"77759257dd9c9465",
"3a5bb57569e07beb",
"76815f07ec2f3eef",
"f5fb96bf1a33b3cd"
],
"x": 54,
"y": 19
},
{
"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
},
{
"id": "8aee4d340a136bac",
"type": "group",
"z": "eff21041cc941fef",
"name": "Downstairs Bathroom",
"style": {
"label": true
},
"nodes": [
"5123a607588fa737",
"f84e6b5157e857cf",
"b7d94cd0e420c650",
"41a8d5ef20cf55d7",
"3e40025ac99ec712",
"8d2e7fb5f214879c",
"b281061a4b08d2eb"
],
"x": 14,
"y": 539
},
{
"id": "550e5b2d99316b12",
"type": "group",
"z": "47f17992fab9b4f5",
"name": "Basement On",
"style": {
"label": true
},
"nodes": [
"1f5808147fa975cf",
"1966d10d8f4467c7",
"a9bc78f321149316",
"b3bb08ff51e46985",
"0c7ef72bd0ef47d4",
"11aabd786c07244f",
"795c53ad6642733a",
"ea5306d6f92d9550",
"4829663e9913e2aa",
"61cb79c998ee0b59"
],
"x": 34,
"y": 639
},
{
"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"
],
"x": 54,
"y": 39
},
{
"id": "26f91eb2ef77450d",
"type": "group",
"z": "bb961e59e2ef86c9",
"name": "iOS Notification Actions",
"style": {
"label": true
},
"nodes": [
"f5aff29df4e07a4a",
"7107656a6cbecce7",
"6bb57058f0a576e7",
"e97b782efaaf5976",
"d8c62e34298105b4",
"900c251ff10a2f5b",
"2a0e3a76af7ab628"
],
"x": 64,
"y": 699
},
{
"id": "a46fc8e7e70ca893",
"type": "group",
"z": "4a8821853d4dd1ad",
"name": "Start/Pause",
"style": {
"label": true
},
"nodes": [
"b2d071ca42e4a3c6",
"7fc67fc156c0f4be",
"34dcb204b421710d",
"797d3e7cc53d773f",
"e69ad4771494c458",
"fdf9b6820eb7289a",
"5c44fd504453ae63",
"908543f7b78f7beb",
"dd0be4a0dd77e1db",
"d6728df5d1fdf67e",
"ae7073e78053da5d",
"6b086807971b2618",
"6736626753b33834",
"736d7433005436b3",
"0aa29248b560c45d",
"b8ca8a1a2655570b",
"24abb932c4cd0b1f",
"c0521b53f7efeb17",
"95d5ac486b4f9ee0",
"49767cbfa622a734",
"04113ab4977bf725",
"9f6498380a05390b",
"452660fbaf11396c",
"93a52960301bb3a3",
"0e39331337b021bb",
"82172c8ab1a9c8e2",
"afeb1d238a623c3d",
"49dbe17ff03ed572"
],
"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": 754,
"y": 39
},
{
"id": "b708cb6d93f40dee",
"type": "group",
"z": "5c4ac37140a54ac9",
"name": "Old Good Morning Flow",
"style": {
"label": true
},
"nodes": [
"c01d647c6091a47b",
"b83b6e027c21a133",
"e59180a1a6ae0a90"
],
"x": 1094,
"y": 659
},
{
"id": "265593f442864b6a",
"type": "group",
"z": "3e4ba157b540d183",
"name": "Climate Variables",
"style": {
"label": true
},
"nodes": [
"a09f10883f07aad0",
"464e9271285f8450",
"9c8056404bfcafed",
"a8d7f5e5d4f549b0"
],
"x": 34,
"y": 419
},
{
"id": "4886967d0f8c0156",
"type": "group",
"z": "ffa6a885ac41a5ed",
"name": "Minecraft VM Sensors",
"style": {
"label": true
},
"nodes": [
"39ba20ccdc0d3291",
"be219cd63a50687b",
"be46f7e1c3d82b99",
"6ba34dc18fbc940f",
"41ff21a8194cd9c8",
"f3ed9c6c6beeaaf3",
"6b368cf77a061795",
"c947f0b38745ac21",
"3d1df2ce8b0b3388",
"82d1a3d67d7b541e",
"b43388fd2c52ca59",
"186b89f637e64299",
"8aace1da7153a6b4",
"533f7ea9ff79fc13",
"f09bb064e2beade2",
"1641a391e57e7e24",
"a3bf61521dbb4dba",
"218a23a093cc070e",
"c3b53f37978e8fff",
"24c50ae79a4c9884",
"9ee545081e378ada",
"1159bd946a485e91",
"e81a5055a5060326",
"771cc9650d25ef9e",
"da4ebf48cc4bd6c4",
"aa5f280744935821",
"81a2ac8ed788454e",
"5ba9cfc0194ef62a"
],
"x": 754,
"y": 319
},
{
"id": "fba69dfc80829db7",
"type": "junction",
"z": "5e238cbbe6d612c9",
"x": 320,
"y": 40,
"wires": [
[
"a17d58585048335d"
]
]
},
{
"id": "34e2055344eea8fe",
"type": "junction",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"x": 1520,
"y": 480,
"wires": [
[
"2dc5f9d3e00f4ddc"
]
]
},
{
"id": "31cb558d6ee383c4",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 460,
"y": 60,
"wires": [
[
"cac7cc3111526a67"
]
]
},
{
"id": "0b79d297a8596c37",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 480,
"y": 120,
"wires": [
[
"ab4c69753bfc36f5"
]
]
},
{
"id": "13d5c047c41f60ba",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 460,
"y": 240,
"wires": [
[
"db54e97573a07fc4"
]
]
},
{
"id": "40817f8c9eeae5fe",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 480,
"y": 300,
"wires": [
[
"77f2aae15fa1250d"
]
]
},
{
"id": "b8995a85f5d34268",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 460,
"y": 420,
"wires": [
[
"be5bdfc3c12b05da"
]
]
},
{
"id": "85bd556a614f0455",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 480,
"y": 480,
"wires": [
[
"728ab818393de52d"
]
]
},
{
"id": "c95d487f9fbe14ce",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 460,
"y": 600,
"wires": [
[
"0b860dc2f7db3ba0"
]
]
},
{
"id": "318bee4424125dd5",
"type": "junction",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"x": 480,
"y": 660,
"wires": [
[
"51d86d6064f084d2"
]
]
},
{
"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": "137fe3f66779bb13",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Start YouTube in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Start YouTube in Living Room"
},
{
"property": "icon",
"value": "mdi:youtube"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "eaeb8fcb37fa8585",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Stop YouTube in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Stop YouTube in Living Room"
},
{
"property": "icon",
"value": "mdi:stop"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "c8312629c112d43a",
"type": "alexa-home-conf",
"username": "tm24fan8"
},
{
"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",
"amazonPage": "amazon.com",
"acceptLanguage": "en-US",
"onKeywordInLanguage": "on",
"userAgent": "",
"useWsMqtt": "on",
"autoInit": "on"
},
{
"id": "266a447bcb22dad6",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Start Twitch in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Start Twitch in Living Room"
},
{
"property": "icon",
"value": "mdi:twitch"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "73718265ac9a1389",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Stop Twitch in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Stop Twitch in Living Room"
},
{
"property": "icon",
"value": "mdi:stop"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "5d20015e8a70767a",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Start Plex in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Start Plex in Living Room"
},
{
"property": "icon",
"value": "mdi:plex"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "c1da63449b303e84",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Stop Plex in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Stop Plex in Living Room"
},
{
"property": "icon",
"value": "mdi:stop"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "eb813ad296813ab2",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Start Netflix in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Start Netflix in Living Room"
},
{
"property": "icon",
"value": "mdi:netflix"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "2a115fc593b081ac",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Stop Netflix in Living Room",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Stop Netflix in Living Room"
},
{
"property": "icon",
"value": "mdi:stop"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"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": "1c6757ac2fa1a199",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Reset Alexa Message",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Reset Alexa Message"
},
{
"property": "icon",
"value": "mdi:backspace-reverse"
},
{
"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": "359a4a5e8f156ab5",
"type": "hue-bridge",
"name": "House",
"bridge": "192.168.1.20",
"key": "JKYIb8bI-owElOdf1eaZYfG022BC8JktFiijKy1G",
"worker": "10",
"autoupdates": true,
"disableupdates": false
},
{
"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": "7df85e301aad3a3d",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Reset Report",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Reset 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": "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": "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": "c120128708971c253cfdb4c0fcaeac0b392b068b4f02764f1161765591dc3eb0"
},
{
"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": "56690d428d1d2022",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"name": "Reset Text Notification",
"version": 6,
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Reset Text Notification"
},
{
"property": "icon",
"value": "mdi:backspace-reverse"
},
{
"property": "device_class",
"value": ""
}
]
},
{
"id": "1d09b6c6a3773d9a",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - CPU Temperature",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - CPU Temperature"
},
{
"property": "icon",
"value": "mdi:thermometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": "temperature"
},
{
"property": "unit_of_measurement",
"value": "°C"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "6cf8f103906c1a49",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - Memory Used",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - Memory Used"
},
{
"property": "icon",
"value": "mdi:memory"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "GB"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "9c9d7870a5204f13",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - CPU Usage",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - CPU Usage"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "%"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "5248dc02bf48733e",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - Uptime",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - Uptime"
},
{
"property": "icon",
"value": "mdi:timer-outline"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "hours"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "d819e61c0895affe",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - Memory Usage",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - Memory Usage"
},
{
"property": "icon",
"value": "mdi:memory"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "%"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "8006b0b34776ec34",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - Free Space Root",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - Free Space Root"
},
{
"property": "icon",
"value": "mdi:harddisk"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "GB"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "5fa5b04e2b1b3ae2",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - CPU Average Loads 1 min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - CPU Average Loads 1 min"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "6f429b0dcaa5c607",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - CPU Average Loads 5 min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - CPU Average Loads 5 min"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "9f53af3ad747cd62",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Basement Server - CPU Average Loads 15 min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - CPU Average Loads 15 min"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "80d831ad0265a01f",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Network RX",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - Network RX"
},
{
"property": "icon",
"value": "mdi:download-network"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "MB/s"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "069a7ab44b04c9ef",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "1dcff2ae01d3156f",
"name": "sensor config for Network TX",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Basement Server - Network TX"
},
{
"property": "icon",
"value": "mdi:upload-network"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "MB/s"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"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": "7cf78f522e860d42",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "",
"name": "Kallen Bedtime",
"version": "6",
"entityType": "button",
"haConfig": [
{
"property": "name",
"value": "Kallen Bedtime"
},
{
"property": "icon",
"value": "mdi:bed"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "device_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "1dcff2ae01d3156f",
"type": "ha-device-config",
"name": "Basement Server",
"hwVersion": "",
"manufacturer": "Iron Nerd",
"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": "e8c9ceddca18e396",
"type": "ha-device-config",
"name": "Minecraft VM",
"hwVersion": "",
"manufacturer": "Iron Nerd",
"model": "",
"swVersion": ""
},
{
"id": "0d6712bde7f2c2aa",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - CPU Usage",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - CPU Usage"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "%"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "3dd7cd5953460bf0",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - Uptime",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - Uptime"
},
{
"property": "icon",
"value": "mdi:timer-outline"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "hours"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "76cd1049416dcd40",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - Memory Used",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - Memory Used"
},
{
"property": "icon",
"value": "mdi:memory"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "GB"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "cb79060b1357cc09",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - Memory Usage",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - Memory Usage"
},
{
"property": "icon",
"value": "mdi:memory"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "%"
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "c8f428ea43d3c0c7",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - Free Space Root",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - Free Space Root"
},
{
"property": "icon",
"value": "mdi:harddisk"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "GB"
},
{
"property": "state_class",
"value": ""
}
],
"resend": false,
"debugEnabled": false
},
{
"id": "a3a6fbcbe94daddf",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - CPU Average Loads 1 min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - CPU Average Loads 1 min"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "704b90ceb496c18d",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - CPU Average Loads 5 min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - CPU Average Loads 5 min"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "61ba199207e4396e",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - CPU Average Loads 15 min",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - CPU Average Loads 15 min"
},
{
"property": "icon",
"value": "mdi:speedometer"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "63218fa218b9ed68",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - Network RX",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - Network RX"
},
{
"property": "icon",
"value": "mdi:download-network"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "MB/s"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "c8bb405fd48982d7",
"type": "ha-entity-config",
"server": "9e87348d.9c1c48",
"deviceConfig": "e8c9ceddca18e396",
"name": "Minecraft VM - Network TX",
"version": "6",
"entityType": "sensor",
"haConfig": [
{
"property": "name",
"value": "Minecraft VM - Network TX"
},
{
"property": "icon",
"value": "mdi:upload-network"
},
{
"property": "entity_category",
"value": ""
},
{
"property": "entity_picture",
"value": ""
},
{
"property": "device_class",
"value": ""
},
{
"property": "unit_of_measurement",
"value": "MB/s"
},
{
"property": "state_class",
"value": "measurement"
}
],
"resend": true,
"debugEnabled": false
},
{
"id": "afead614fabc01bb",
"type": "function",
"z": "a42343e035e3313c",
"name": "",
"func": "const alexa = global.get('lastAlexaSerial')\nvar statusMsg = {\n \"payload\": alexa\n}\n\nmsg.where = alexa\n\nreturn[msg,statusMsg]",
"outputs": 2,
"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,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 190,
"y": 80,
"wires": [
[
"80ce4b42b82e3c78"
]
]
},
{
"id": "80ce4b42b82e3c78",
"type": "function",
"z": "4107976aa434eb03",
"name": "Rounding",
"func": "var temp = msg.data.main.temp\nvar feels_like = msg.data.main.feels_like\nvar temp_min = msg.data.main.temp_min\nvar temp_max = msg.data.main.temp_max\nvar pressure = msg.data.main.pressure\nvar windspeed = msg.data.wind.speed\nvar 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,
"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": 5,
"debugenabled": false,
"domain": "script",
"service": "speech_engine",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": msg.topic,\t \"message\": msg.payload,\t \"voice\": msg.voice,\t \"type\": msg.type\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 420,
"y": 160,
"wires": [
[]
]
},
{
"id": "cee17a2c2fbb48ee",
"type": "function",
"z": "6429099c4571dd6b",
"name": "Processing",
"func": "var room = msg.topic\n\nif (room === \"Living Room\") {\n msg.topic = \"living_room\"\n} else if (room === \"Living Room Echo Dot\") {\n msg.topic = \"living_room\"\n} else if (room === \"Basement\") {\n msg.topic = \"basement\"\n} else if (room === \"Basement Echo Dot\") {\n msg.topic = \"basement\"\n} else if (room === \"Basement Google\") {\n msg.topic = \"basement_google\"\n} else if (room === \"basement_google\") {\n msg.topic = \"basement_google\"\n} else if (room === \"Kallen Bedroom\") {\n msg.topic = \"kallen_bedroom\"\n} else if (room === \"Kallen Bedroom Speaker\") {\n msg.topic = \"kallen_bedroom\"\n} else if (room === \"Emma Bedroom\") {\n msg.topic = \"emma_bedroom\"\n} else if (room === \"Emma Bedroom Speaker\") {\n msg.topic = \"emma_bedroom\"\n} else if (room === \"Kids Bedrooms\") {\n msg.topic = \"kids_bedrooms\"\n} else if (room === \"All Bedrooms\") {\n msg.topic = \"all_bedrooms\"\n} else if (room === \"Master Bedroom\") {\n msg.topic = \"master_bedroom\"\n} else if (room === \"Master Bedroom Echo Dot\") {\n msg.topic = \"master_bedroom\"\n} else if (room === \"Common Areas\") {\n msg.topic = \"common\"\n} else if (room === \"Everywhere\") {\n msg.topic = \"everywhere\"\n}\n\nif (msg.voice) {\n msg.voice = msg.voice\n} else {\n msg.voice = global.get('jarvis_voice')\n}\n\nif (msg.type) {\n msg.type = msg.type\n} else {\n msg.type = \"normal\"\n}\n\nvar statusMsg = {\n \"payload\": msg.voice + \" speaking in \" + room\n}\n\nreturn[msg,statusMsg];",
"outputs": 2,
"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\nvar dest = tpc.replaceAll(\"_\",\" \")\nvar scene = pld.replaceAll(\"_\",\" \")\n\nmsg.topic = dest\nmsg.payload = scene\n\nreturn msg;",
"outputs": 1,
"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": 5,
"debugenabled": false,
"domain": "hue",
"service": "hue_activate_scene",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"group_name\": msg.topic,\t \"scene_name\": msg.payload,\t \"dynamic\": \"true\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 370,
"y": 40,
"wires": [
[
"011c7df420cc7f1a"
]
]
},
{
"id": "011c7df420cc7f1a",
"type": "function",
"z": "a062d9e6d44506dc",
"name": "Notification",
"func": "const tpc = msg.topic\nvar dest = tpc.replaceAll(\" \",\"_\")\n\nscene = msg.payload\nmsg.dest = dest\n\nmsg.topic = \"Lights Changed\"\nmsg.payload = ('Lights changed to a new scene: ' + scene)\n\nif (msg.payload === 'Lights changed to a new scene: Reset') {\n return null;\n} else {\n return msg;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 590,
"y": 40,
"wires": [
[]
]
},
{
"id": "0515d266dc983793",
"type": "api-call-service",
"z": "582b8363c9f33bf8",
"name": "Record Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.{{topic}}_selected_scene"
],
"data": "{\t \"value\": msg.payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 340,
"y": 40,
"wires": [
[
"2fc6ea08f8f366b6"
]
]
},
{
"id": "2fc6ea08f8f366b6",
"type": "api-call-service",
"z": "582b8363c9f33bf8",
"name": "Reset Dropdown",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_first",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.{{topic}}_scenes"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 550,
"y": 40,
"wires": [
[]
]
},
{
"id": "f1c11209a9226be9",
"type": "function",
"z": "582b8363c9f33bf8",
"name": "",
"func": "const pld = msg.payload\nvar scene = pld.replaceAll(\"_\",\" \")\n\nmsg.payload = scene\n\nreturn msg;",
"outputs": 1,
"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": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.{{topic}}_{{payload}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1230,
"y": 440,
"wires": [
[
"6ae79d1701e78840"
]
]
},
{
"id": "a89c7e8905a07998",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Reset",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.{{topic}}_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 550,
"y": 360,
"wires": [
[]
]
},
{
"id": "8c4d4fe614a52d4f",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Apply Adaptive Lighting",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "adaptive_lighting",
"service": "apply",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_{{topic}}"
],
"data": "{\t \"adapt_brightness\" : msg.brightness,\t \"adapt_color\" : msg.color\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1530,
"y": 280,
"wires": [
[
"22250920efccf4d1"
]
]
},
{
"id": "a4926fb1dba17563",
"type": "switch",
"z": "a4ee891237e460a2",
"name": "Nightlight?",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "Nightlight",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 810,
"y": 440,
"wires": [
[
"c19b4dccc5d6a9af"
],
[
"f07ca0de800cbc8f"
]
]
},
{
"id": "c19b4dccc5d6a9af",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Nightlight On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 990,
"y": 420,
"wires": [
[
"942a915b6599fb27"
]
]
},
{
"id": "f07ca0de800cbc8f",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Nightlight Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 990,
"y": 480,
"wires": [
[
"942a915b6599fb27"
]
]
},
{
"id": "3a4f567b17b2214e",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Nightlight Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 930,
"y": 280,
"wires": [
[
"f41c0229b9fdcea4"
]
]
},
{
"id": "f41c0229b9fdcea4",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Turn Lights On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.{{topic}}_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"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": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 600,
"y": 160,
"wires": [
[]
]
},
{
"id": "1c03c55909a9b552",
"type": "switch",
"z": "a4ee891237e460a2",
"name": "",
"property": "dest",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "living_room",
"vt": "str"
},
{
"t": "eq",
"v": "master_bedroom",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1550,
"y": 440,
"wires": [
[
"60924f02885cc3c8"
],
[
"ccb129e61b136746"
]
]
},
{
"id": "6ae79d1701e78840",
"type": "function",
"z": "a4ee891237e460a2",
"name": "Format",
"func": "const str = msg.payload\nvar scene = str.replaceAll(\"_\",\" \")\n\nmsg.dest = msg.topic\n\nmsg.topic = \"Lights Changed\"\nmsg.payload = ('Lights changed to a new scene: ' + scene)\n\nif (msg.payload === 'Lights changed to a new scene: Reset') {\n return null;\n} else {\n return msg;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1400,
"y": 440,
"wires": [
[
"1c03c55909a9b552"
]
]
},
{
"id": "dc0972a3964e6513",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Adaptive Lighting Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 600,
"y": 520,
"wires": [
[]
]
},
{
"id": "22250920efccf4d1",
"type": "link out",
"z": "a4ee891237e460a2",
"name": "Adaptive Lighting Flow",
"mode": "link",
"links": [
"a092a70d91589196"
],
"x": 1695,
"y": 280,
"wires": []
},
{
"id": "a092a70d91589196",
"type": "link in",
"z": "a4ee891237e460a2",
"name": "Scene Formatting",
"links": [
"22250920efccf4d1"
],
"x": 1265,
"y": 380,
"wires": [
[
"6ae79d1701e78840"
]
]
},
{
"id": "defe84d113029e8e",
"type": "subflow:a062d9e6d44506dc",
"z": "a4ee891237e460a2",
"name": "",
"x": 1280,
"y": 340,
"wires": [
[
"1c03c55909a9b552"
]
]
},
{
"id": "04f7db2902e58e41",
"type": "api-current-state",
"z": "a4ee891237e460a2",
"name": "Dynamic Scenes",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.{{topic}}_dynamic_scenes",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1010,
"y": 340,
"wires": [
[
"defe84d113029e8e"
],
[
"942a915b6599fb27"
]
]
},
{
"id": "b14287e013bba748",
"type": "switch",
"z": "a4ee891237e460a2",
"name": "Dynamic Rooms",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "living_room",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 580,
"y": 440,
"wires": [
[
"04f7db2902e58e41"
],
[
"a4926fb1dba17563"
]
]
},
{
"id": "bd8c5a7b9e7b24b2",
"type": "switch",
"z": "a4ee891237e460a2",
"name": "Dynamic Rooms",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "living_room",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 580,
"y": 280,
"wires": [
[
"72c0b7fda242bb67"
],
[
"3a4f567b17b2214e"
]
]
},
{
"id": "72c0b7fda242bb67",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Dynamic Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.{{topic}}_dynamic_scenes"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 750,
"y": 220,
"wires": [
[
"3a4f567b17b2214e"
]
]
},
{
"id": "a81fd188d89faa25",
"type": "subflow:582b8363c9f33bf8",
"z": "a4ee891237e460a2",
"name": "",
"x": 570,
"y": 620,
"wires": []
},
{
"id": "de5a484b79c5d0e4",
"type": "subflow:582b8363c9f33bf8",
"z": "a4ee891237e460a2",
"name": "",
"x": 570,
"y": 80,
"wires": []
},
{
"id": "60924f02885cc3c8",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Notify Living Room TV",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": \"living_room\",\t \"title\": msg.topic,\t \"message\": msg.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",
"x": 1760,
"y": 400,
"wires": [
[]
]
},
{
"id": "ccb129e61b136746",
"type": "api-call-service",
"z": "a4ee891237e460a2",
"name": "Notify Master Bedroom TV",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": \"master_bedroom\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"30%\",\t \"color\": \"red\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1780,
"y": 480,
"wires": [
[]
]
},
{
"id": "ca51f6e6bd51fb55",
"type": "function",
"z": "a4ee891237e460a2",
"name": "Routing",
"func": "var str = msg.payload\nvar newPayload = str.replaceAll(\" \",\"_\")\n\nmsg.payload = newPayload\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,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 360,
"wires": [
[
"de5a484b79c5d0e4",
"97400c5ff0842570",
"bd8c5a7b9e7b24b2"
],
[
"a89c7e8905a07998"
],
[
"b14287e013bba748",
"dc0972a3964e6513",
"a81fd188d89faa25"
]
],
"outputLabels": [
"Adaptive",
"Reset",
"Otherwise"
],
"icon": "node-red/switch.svg"
},
{
"id": "1bb8f2070d805c99",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.{{topic}}_{{payload}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1010,
"y": 380,
"wires": [
[
"5c8b0b6fa5c68af6"
]
]
},
{
"id": "edcb381597f48298",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Apply Adaptive Lighting",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "adaptive_lighting",
"service": "apply",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1190,
"y": 200,
"wires": [
[
"cdfe1cc1b7a2e80e"
]
]
},
{
"id": "e6a15d04a48511a7",
"type": "switch",
"z": "74d3a55b70dc2d6c",
"name": "Nightlight?",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "Nightlight",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 590,
"y": 380,
"wires": [
[
"2181bd265057807f"
],
[
"43dc3207a4e8d477"
]
]
},
{
"id": "2181bd265057807f",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Nightlight On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 770,
"y": 360,
"wires": [
[
"1bb8f2070d805c99"
]
]
},
{
"id": "43dc3207a4e8d477",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Nightlight Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 770,
"y": 420,
"wires": [
[
"1bb8f2070d805c99"
]
]
},
{
"id": "39f295bc8480147a",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Turn Lights On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.{{topic}}_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 780,
"y": 200,
"wires": [
[
"bd31f35628ebb5d0"
]
]
},
{
"id": "bd31f35628ebb5d0",
"type": "delay",
"z": "74d3a55b70dc2d6c",
"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": 970,
"y": 200,
"wires": [
[
"edcb381597f48298"
]
]
},
{
"id": "5c8b0b6fa5c68af6",
"type": "function",
"z": "74d3a55b70dc2d6c",
"name": "Format",
"func": "const str = msg.payload\nvar scene = str.replaceAll(\"_\",\" \")\n\nmsg.dest = msg.topic\n\nmsg.topic = \"Lights Changed\"\nmsg.payload = ('Lights changed to a new scene: ' + scene)\n\nif (msg.payload === 'Lights changed to a new scene: Reset') {\n return null;\n} else {\n return msg;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1180,
"y": 380,
"wires": [
[
"15484a2c724cc88d"
]
]
},
{
"id": "16d9d3387751c4d4",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Adapt Brightness Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_adapt_brightness_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 620,
"y": 480,
"wires": [
[
"422b394996ac094e"
]
]
},
{
"id": "49ec3fb036ff367f",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Adapt Brightness On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_adapt_brightness_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 620,
"y": 100,
"wires": [
[
"811cc7c782907fce"
]
]
},
{
"id": "422b394996ac094e",
"type": "switch",
"z": "74d3a55b70dc2d6c",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Purple",
"vt": "str"
},
{
"t": "eq",
"v": "Pink",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 830,
"y": 480,
"wires": [
[
"7a7ad5e937adcea4"
],
[
"7a7ad5e937adcea4"
]
]
},
{
"id": "811cc7c782907fce",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Adaptive Lighting On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 860,
"y": 100,
"wires": [
[]
]
},
{
"id": "7a7ad5e937adcea4",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Adaptive Lighting Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1040,
"y": 480,
"wires": [
[]
]
},
{
"id": "cdfe1cc1b7a2e80e",
"type": "link out",
"z": "74d3a55b70dc2d6c",
"name": "Adaptive Lighting Flow",
"mode": "link",
"links": [
"318c3055f2d96a7c"
],
"x": 1365,
"y": 200,
"wires": []
},
{
"id": "318c3055f2d96a7c",
"type": "link in",
"z": "74d3a55b70dc2d6c",
"name": "Scene Formatting",
"links": [
"cdfe1cc1b7a2e80e"
],
"x": 1045,
"y": 320,
"wires": [
[
"5c8b0b6fa5c68af6"
]
]
},
{
"id": "6a5da3eff6ace96d",
"type": "subflow:582b8363c9f33bf8",
"z": "74d3a55b70dc2d6c",
"name": "",
"x": 590,
"y": 560,
"wires": []
},
{
"id": "464d7284c477d2f3",
"type": "subflow:582b8363c9f33bf8",
"z": "74d3a55b70dc2d6c",
"name": "",
"x": 590,
"y": 20,
"wires": []
},
{
"id": "15484a2c724cc88d",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Notify Basement TV",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": \"basement\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"30%\",\t \"color\": \"red\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1420,
"y": 380,
"wires": [
[]
]
},
{
"id": "622b8178adf9d4a8",
"type": "function",
"z": "74d3a55b70dc2d6c",
"name": "Routing",
"func": "var str = msg.payload\nvar newPayload = str.replaceAll(\" \",\"_\")\n\nmsg.payload = newPayload\n\nif (newPayload === 'Select') {\n return null\n} else if (newPayload === 'Adaptive') {\n return[msg,null]\n} else {\n return[null,msg]\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 300,
"wires": [
[
"464d7284c477d2f3",
"49ec3fb036ff367f",
"6d40624de5c75c9d"
],
[
"e6a15d04a48511a7",
"16d9d3387751c4d4",
"6a5da3eff6ace96d"
]
],
"icon": "node-red/switch.svg"
},
{
"id": "6d40624de5c75c9d",
"type": "api-call-service",
"z": "74d3a55b70dc2d6c",
"name": "Nightlight Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 590,
"y": 200,
"wires": [
[
"39f295bc8480147a"
]
]
},
{
"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')\nvar 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,
"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": "655050669e5ccf85",
"type": "api-call-service",
"z": "85c4f81ca9628aea",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.{{payload}}_in_{{topic}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 670,
"y": 340,
"wires": [
[
"8ad119b6c6e11ddd"
]
]
},
{
"id": "8ad119b6c6e11ddd",
"type": "function",
"z": "85c4f81ca9628aea",
"name": "Format",
"func": "const str = msg.payload\nvar scene = str.replaceAll(\"_\",\" \")\n\nmsg.dest = msg.topic\n\nmsg.topic = \"Lights Changed\"\nmsg.payload = ('Lights changed to a new scene: ' + scene)\n\nif (msg.payload === 'Lights changed to a new scene: Reset') {\n return null;\n} else {\n return msg;\n}\nreturn msg;",
"outputs": 1,
"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": "var str = msg.payload\nvar newPayload = str.replaceAll(\" \",\"_\")\n\nmsg.payload = newPayload\n\nif (newPayload != 'Select' && newPayload != 'Reset') {\n return msg;\n} else {\n return null\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 340,
"wires": [
[
"655050669e5ccf85",
"78a73c2d816658d8"
]
],
"outputLabels": [
"Adaptive",
"Reset",
"Otherwise"
]
},
{
"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')\nvar statusMsg = {\n \"payload\": alexa\n}\n\nmsg.who = alexa\n\nreturn[msg,statusMsg]",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 80,
"wires": [
[],
[]
]
},
{
"id": "b2d071ca42e4a3c6",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Convert to seconds",
"func": "msg.duration = msg.duration * 60\n\nnode.status({ fill: \"green\", shape: \"dot\", text: msg.duration + \"s\"});\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 675,
"y": 200,
"wires": [
[
"7fc67fc156c0f4be"
]
],
"l": false
},
{
"id": "7fc67fc156c0f4be",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_timer"
],
"data": "{ \"duration\": {{duration}}}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 790,
"y": 200,
"wires": [
[]
]
},
{
"id": "34dcb204b421710d",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Resume Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_timer"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 580,
"y": 440,
"wires": [
[
"e69ad4771494c458",
"93a52960301bb3a3"
]
]
},
{
"id": "923538ef97772f0c",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Notification",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\":\"kallen\",\t \"message\": msg.payload,\t \"title\": msg.topic,\t \"type\": \"normal\",\t \"tag\": \"kallen-timer-finished\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"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": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 130,
"y": 300,
"wires": [
[
"452660fbaf11396c"
]
]
},
{
"id": "fe1ba086baf93ec0",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Reset Slider",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_number",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_number.kallen_activity_duration"
],
"data": "{\t \"value\":30\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"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": [
[]
],
"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": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [
"kallen_bedroom"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"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": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [
"kallen_bedroom"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"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": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_bedroom_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1300,
"y": 80,
"wires": [
[]
]
},
{
"id": "6b086807971b2618",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Set to Adaptive",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_bedroom_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"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": [
[]
],
"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": "var 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,
"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": [
[]
],
"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": [
[]
],
"l": false
},
{
"id": "e9e8bc8b535c232f",
"type": "comment",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Complete a task",
"info": "",
"x": 740,
"y": 820,
"wires": []
},
{
"id": "9f6498380a05390b",
"type": "switch",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Routing",
"property": "timerstate",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "idle",
"vt": "str"
},
{
"t": "eq",
"v": "active",
"vt": "str"
},
{
"t": "eq",
"v": "paused",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 435,
"y": 300,
"wires": [
[
"0e39331337b021bb"
],
[
"82172c8ab1a9c8e2"
],
[
"34dcb204b421710d"
]
],
"l": false
},
{
"id": "452660fbaf11396c",
"type": "api-current-state",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Timer State",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "timer.kallen_timer",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "timerstate",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "timerdata",
"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": 310,
"y": 300,
"wires": [
[
"9f6498380a05390b"
]
]
},
{
"id": "206e512c5268020f",
"type": "server-events",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "timer.finished",
"exposeToHomeAssistant": false,
"eventData": "{\"entity_id\":\"timer.kallen_timer\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"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": "var states = global.get('homeassistant.homeAssistant.states')\nvar room = states['input_select.kallen_activity_room'].state\nvar activity = states['input_select.kallen_activities'].state\nvar minutes = states['sensor.kallen_timer_remaining_minutes'].state\nvar 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,
"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": "var states = global.get('homeassistant.homeAssistant.states')\nvar room = states['input_select.kallen_activity_room'].state\nvar activity = states['input_select.kallen_activities'].state\nvar controlLights = states['input_boolean.kallen_timer_control_lights'].state\nvar duration = states['input_number.kallen_activity_duration'].state\nvar 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,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 160,
"wires": [
[
"b2d071ca42e4a3c6",
"b8ca8a1a2655570b",
"49dbe17ff03ed572"
],
[
"b2d071ca42e4a3c6",
"b8ca8a1a2655570b",
"49dbe17ff03ed572"
],
[
"b2d071ca42e4a3c6",
"b8ca8a1a2655570b",
"49dbe17ff03ed572"
]
],
"outputLabels": [
"Basement",
"Kallen Bedroom",
"Otherwise"
],
"icon": "font-awesome/fa-hourglass-start"
},
{
"id": "82172c8ab1a9c8e2",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Announce",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar room = states['input_select.kallen_activity_room'].state\nvar activity = states['input_select.kallen_activities'].state\nvar minutes = states['sensor.kallen_timer_remaining_minutes'].state\nvar 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,
"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": 5,
"debugenabled": false,
"domain": "timer",
"service": "pause",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.kallen_timer"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 770,
"y": 360,
"wires": [
[
"c0521b53f7efeb17"
]
]
},
{
"id": "4da18a3f1e0298db",
"type": "function",
"z": "4a8821853d4dd1ad",
"g": "1ca205a84922c8c2",
"name": "Announce",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar room = states['input_select.kallen_activity_room'].state\nvar 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,
"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,
"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": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"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": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.living_room_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1300,
"y": 140,
"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"
],
[
"6ee65c58bd763ecf"
]
]
},
{
"id": "0371f41c342134a0",
"type": "switch",
"z": "e44b1e7a8ef7ae1d",
"name": "Day or night",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 510,
"y": 180,
"wires": [
[
"d606a51a9cd648da"
],
[
"d394df04f71de37a",
"4781b749d186cd7f",
"7ef7610b2f402829",
"47862a29a4c2efd1"
]
]
},
{
"id": "e9aba9f5312297b7",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Set Scenes",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "evening_on_first_floor",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"sunset_lights\": 1\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2070,
"y": 180,
"wires": [
[
"db751091895c18b8",
"4449d5ec66482683",
"65a3169bc9301a4d",
"d0cac72a2cc0d7a7"
]
]
},
{
"id": "1e365f7e5ba78955",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Turn off night lighting",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [
"front_porch",
"upstairs_hallway"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1160,
"y": 200,
"wires": [
[
"8556daf4bc9df581"
]
]
},
{
"id": "8556daf4bc9df581",
"type": "delay",
"z": "e44b1e7a8ef7ae1d",
"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": 1400,
"y": 240,
"wires": [
[
"40a4142a0f72b94a",
"5ee1e29d42eb0b88",
"7b9e480fbcf14b44"
]
]
},
{
"id": "40a4142a0f72b94a",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Sleep mode off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_sleep_mode_basement_studio",
"switch.adaptive_lighting_sleep_mode_dining_room_lamp",
"switch.adaptive_lighting_sleep_mode_downstairs_bathroom",
"switch.adaptive_lighting_sleep_mode_emma_bedroom",
"switch.adaptive_lighting_sleep_mode_kallen_bedroom",
"switch.adaptive_lighting_sleep_mode_living_room",
"switch.adaptive_lighting_sleep_mode_master_bedroom",
"switch.adaptive_lighting_sleep_mode_mud_room",
"switch.adaptive_lighting_sleep_mode_tina_lamp",
"switch.adaptive_lighting_sleep_mode_upstairs_bathroom",
"switch.adaptive_lighting_sleep_mode_upstairs_hallway"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1640,
"y": 240,
"wires": [
[]
]
},
{
"id": "990ab49071133125",
"type": "change",
"z": "e44b1e7a8ef7ae1d",
"name": "Clear Weather Message",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Lights on after delay due to clear weather",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Sunset Lights ON",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1905,
"y": 60,
"wires": [
[
"e9aba9f5312297b7",
"df102c847233f0b5"
]
],
"l": false
},
{
"id": "60d401148ecff1ef",
"type": "change",
"z": "e44b1e7a8ef7ae1d",
"name": "Cloudy Weather Message",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Lights on early due to cloudy weather",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Sunset Lights ON",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1905,
"y": 180,
"wires": [
[
"e9aba9f5312297b7",
"df102c847233f0b5"
]
],
"l": false
},
{
"id": "d394df04f71de37a",
"type": "api-current-state",
"z": "e44b1e7a8ef7ae1d",
"name": "Interior Toggle",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.sunset_lights_on",
"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": 740,
"y": 240,
"wires": [
[
"24685bfd0b3069f3"
],
[]
]
},
{
"id": "4fcc6c68cec50467",
"type": "api-current-state",
"z": "e44b1e7a8ef7ae1d",
"name": "Is Family Home?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "group.adults",
"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": 1750,
"y": 80,
"wires": [
[
"990ab49071133125"
],
[
"411c0ddd868c6e9d"
]
]
},
{
"id": "8a5b225968323ce6",
"type": "api-current-state",
"z": "e44b1e7a8ef7ae1d",
"name": "Is Family Home?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "group.adults",
"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": 1750,
"y": 180,
"wires": [
[
"60d401148ecff1ef"
],
[
"411c0ddd868c6e9d"
]
]
},
{
"id": "411c0ddd868c6e9d",
"type": "change",
"z": "e44b1e7a8ef7ae1d",
"name": "Skipped Message",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Lights not on due to nobody home, or toggle shutoff",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Sunset Lights SKIPPED",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2075,
"y": 120,
"wires": [
[
"db751091895c18b8",
"4449d5ec66482683",
"65a3169bc9301a4d"
]
],
"l": false
},
{
"id": "5ee1e29d42eb0b88",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Adaptive Lighting On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_basement_studio",
"switch.adaptive_lighting_dining_room_lamp",
"switch.adaptive_lighting_downstairs_bathroom",
"switch.adaptive_lighting_emma_bedroom",
"switch.adaptive_lighting_kallen_bedroom",
"switch.adaptive_lighting_living_room",
"switch.adaptive_lighting_master_bedroom",
"switch.adaptive_lighting_mud_room",
"switch.adaptive_lighting_tina_lamp",
"switch.adaptive_lighting_upstairs_bathroom",
"switch.adaptive_lighting_upstairs_hallway"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1660,
"y": 360,
"wires": [
[]
]
},
{
"id": "907ad93232629cb5",
"type": "link out",
"z": "e44b1e7a8ef7ae1d",
"name": "Night Interior Toggle Off",
"mode": "link",
"links": [
"b37f91bf63e79996"
],
"x": 1245,
"y": 160,
"wires": []
},
{
"id": "b37f91bf63e79996",
"type": "link in",
"z": "e44b1e7a8ef7ae1d",
"name": "Skip Formatting",
"links": [
"77c69154733e7366",
"907ad93232629cb5"
],
"x": 1905,
"y": 120,
"wires": [
[
"411c0ddd868c6e9d"
]
]
},
{
"id": "4781b749d186cd7f",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Turn off booleans",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.give_me_darkness",
"input_boolean.goodnight",
"input_boolean.kallen_computer_updates",
"input_boolean.night_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 750,
"y": 320,
"wires": [
[]
]
},
{
"id": "7b9e480fbcf14b44",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Reset Scene Text",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.basement_studio_selected_scene",
"input_text.dining_room_lamp_selected_scene",
"input_text.downstairs_bathroom_selected_scene",
"input_text.emma_bedroom_selected_scene",
"input_text.front_porch_selected_scene",
"input_text.kallen_bedroom_selected_scene",
"input_text.living_room_selected_scene",
"input_text.master_bedroom_selected_scene",
"input_text.mud_room_selected_scene",
"input_text.tina_lamp_selected_scene",
"input_text.upstairs_bathroom_selected_scene",
"input_text.upstairs_hallway_selected_scene"
],
"data": "{\t \"value\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1650,
"y": 420,
"wires": [
[
"fc85ca4a4c57b5bf"
]
]
},
{
"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"
}
],
"x": 1420,
"y": 180,
"wires": [
[
"8a5b225968323ce6"
]
]
},
{
"id": "dcf7a21a3844fbb0",
"type": "inject",
"z": "e44b1e7a8ef7ae1d",
"name": "Manual Off",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "num",
"x": 520,
"y": 240,
"wires": [
[
"4781b749d186cd7f",
"47862a29a4c2efd1",
"24685bfd0b3069f3",
"7ef7610b2f402829"
]
]
},
{
"id": "6ee65c58bd763ecf",
"type": "api-current-state",
"z": "e44b1e7a8ef7ae1d",
"name": "Vacation Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.vacation_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "vacation",
"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": 320,
"y": 180,
"wires": [
[
"0371f41c342134a0"
],
[]
],
"outputLabels": [
"Off",
"On"
]
},
{
"id": "db751091895c18b8",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "iOS Notifications",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\":\"all\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"type\": \"normal\",\t \"tag\": \"sunset-lights\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2320,
"y": 120,
"wires": [
[]
]
},
{
"id": "4449d5ec66482683",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "TV Notifications",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\":\"all\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"25%\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2320,
"y": 180,
"wires": [
[]
]
},
{
"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": 580,
"wires": [
[
"828e99767076eae5"
]
]
},
{
"id": "828e99767076eae5",
"type": "switch",
"z": "e44b1e7a8ef7ae1d",
"name": "Is Event Tomorrow",
"property": "tomorrow",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "0",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 370,
"y": 580,
"wires": [
[
"f5eb76f93946aad3"
],
[
"62b61a9d45d27b46"
]
]
},
{
"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": 740,
"y": 580,
"wires": [
[]
]
},
{
"id": "f5eb76f93946aad3",
"type": "change",
"z": "e44b1e7a8ef7ae1d",
"name": "Set True",
"rules": [
{
"t": "set",
"p": "work_tomorrow",
"pt": "msg",
"to": "true",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 540,
"wires": [
[
"798ff6ede18394ea"
]
]
},
{
"id": "62b61a9d45d27b46",
"type": "change",
"z": "e44b1e7a8ef7ae1d",
"name": "Set False",
"rules": [
{
"t": "set",
"p": "work_tomorrow",
"pt": "msg",
"to": "false",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 620,
"wires": [
[
"798ff6ede18394ea"
]
]
},
{
"id": "7ef7610b2f402829",
"type": "api-current-state",
"z": "e44b1e7a8ef7ae1d",
"name": "Motion On?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.upstairs_bathroom_occupied",
"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": 730,
"y": 380,
"wires": [
[
"80a2c88e730484cc"
],
[]
],
"outputLabels": [
"Off",
"On"
]
},
{
"id": "80a2c88e730484cc",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Upstairs Bathroom Lights Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [
"upstairs_bathroom"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 980,
"y": 380,
"wires": [
[]
]
},
{
"id": "1de987d9202de646",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.sunset_lighting_timer"
],
"data": "{\t \"duration\":\"00:30:00\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1350,
"y": 40,
"wires": [
[]
]
},
{
"id": "6995391c94793f08",
"type": "server-events",
"z": "e44b1e7a8ef7ae1d",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "timer.finished",
"exposeToHomeAssistant": false,
"eventData": "{\"entity_id\":\"timer.sunset_lighting_timer\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 1520,
"y": 100,
"wires": [
[
"4fcc6c68cec50467"
]
]
},
{
"id": "1661877c3165ccd8",
"type": "inject",
"z": "e44b1e7a8ef7ae1d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1120,
"y": 40,
"wires": [
[
"1de987d9202de646"
]
]
},
{
"id": "65a3169bc9301a4d",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Holiday Code",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar holidayMode = states['input_boolean.holiday_mode'].state\nvar currentHoliday = states['input_select.holiday_animation'].state\nvar holiday = currentHoliday.toLowerCase()\n\nif (holidayMode === 'on') {\n msg.holiday = holiday\n node.status({fill:\"green\",shape:\"dot\",text:\"Holiday On\"});\n return msg;\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Holiday Off\"});\n return null;\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2320,
"y": 240,
"wires": [
[
"3f695f3f93209060",
"16d9572e576c9488"
]
],
"icon": "font-awesome/fa-tree"
},
{
"id": "63e29e0cab0d4579",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Holiday Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.animated_scene_{{holiday}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2700,
"y": 240,
"wires": [
[]
]
},
{
"id": "3f695f3f93209060",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Adaptive Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_front_porch"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2510,
"y": 240,
"wires": [
[
"63e29e0cab0d4579"
]
]
},
{
"id": "47862a29a4c2efd1",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Holiday Code",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar holidayMode = states['input_boolean.holiday_mode'].state\nvar holidayHold = states['input_boolean.holiday_mode_hold'].state\nvar currentHoliday = states['input_select.holiday_animation'].state\nvar holiday = currentHoliday.toLowerCase()\n\nif (holidayMode === 'on') {\n if (holidayHold === 'off') {\n node.status({ fill: \"green\", shape: \"dot\", text: \"Holiday On\" });\n msg.holiday = holiday\n return msg;\n } else {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"Holiday Hold On\"});\n msg.holiday = holiday\n return msg;\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Holiday Off\"});\n return null;\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 440,
"wires": [
[
"5c7200b067eb96eb",
"6987f02f09134764"
]
],
"icon": "font-awesome/fa-tree"
},
{
"id": "5c7200b067eb96eb",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Holiday Animation Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.animated_scene_{{holiday}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 960,
"y": 440,
"wires": [
[]
]
},
{
"id": "16d9572e576c9488",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Xmas Lights On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.front_window_christmas_lights",
"light.living_room_christmas_tree"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2520,
"y": 300,
"wires": [
[]
]
},
{
"id": "6987f02f09134764",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"d": true,
"name": "Xmas Lights Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.front_window_christmas_lights",
"light.living_room_christmas_tree"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 940,
"y": 500,
"wires": [
[]
]
},
{
"id": "fc85ca4a4c57b5bf",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Reset Scene Text",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.tina_desk_selected_scene"
],
"data": "{\t \"value\":\"Day Mode\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1910,
"y": 420,
"wires": [
[]
]
},
{
"id": "d0cac72a2cc0d7a7",
"type": "api-current-state",
"z": "e44b1e7a8ef7ae1d",
"name": "Desk Lights On?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "light.tina_desk_lights",
"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": 2330,
"y": 60,
"wires": [
[
"7c3feabba66ced30"
],
[]
]
},
{
"id": "7c3feabba66ced30",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Reset Desk Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.tina_desk_scenes"
],
"data": "{\t \"option\":\"Reset\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2550,
"y": 60,
"wires": [
[]
]
},
{
"id": "24685bfd0b3069f3",
"type": "api-current-state",
"z": "e44b1e7a8ef7ae1d",
"name": "Holiday Hold",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.holiday_mode_hold",
"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": 930,
"y": 240,
"wires": [
[
"1e365f7e5ba78955"
],
[
"ad34a6e7cb0169ad"
]
],
"outputLabels": [
"Off",
"On"
]
},
{
"id": "ad34a6e7cb0169ad",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Turn off night lighting",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [
"upstairs_hallway"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1160,
"y": 260,
"wires": [
[
"8556daf4bc9df581"
]
]
},
{
"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": 510,
"y": 40,
"wires": [
[
"f6836ec53245f207"
]
]
},
{
"id": "15a73af2f8ea690c",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Invert",
"func": "var 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,
"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": 800,
"y": 40,
"wires": []
},
{
"id": "f6836ec53245f207",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Invert",
"func": "var 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,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 655,
"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": 420,
"y": 420,
"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": 420,
"y": 360,
"wires": []
},
{
"id": "14ea08ea216a10b6",
"type": "server-state-changed",
"z": "e44b1e7a8ef7ae1d",
"name": "Night Mode",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.night_mode",
"entityidfiltertype": "exact",
"outputinitially": true,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 420,
"wires": [
[
"369e5f1ea8730d39"
]
]
},
{
"id": "e6fdd1843b17def1",
"type": "server-state-changed",
"z": "e44b1e7a8ef7ae1d",
"name": "Give Me Darkness",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.give_me_darkness",
"entityidfiltertype": "exact",
"outputinitially": true,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 170,
"y": 360,
"wires": [
[
"9d4ffc704e9ff81e"
]
]
},
{
"id": "d606a51a9cd648da",
"type": "function",
"z": "e44b1e7a8ef7ae1d",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar sunsetLights = states['input_boolean.sunset_lights_on'].state\nvar weather = states['weather.iron_nerd_weather_station'].state\n\nif (sunsetLights === 'on') {\n if (weather === 'sunny' || weather === 'clear-night') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Nice Weather\"});\n return[msg,null,null]\n } else {\n node.status({fill:\"grey\",shape:\"dot\",text:\"Shitty Weather\"});\n return[null,msg,null]\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Disabled\"});\n return[null,null,msg]\n}\n\nreturn msg;",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1130,
"y": 120,
"wires": [
[
"1de987d9202de646"
],
[
"8a5b225968323ce6"
],
[
"907ad93232629cb5"
]
],
"outputLabels": [
"Sunny",
"Not Sunny",
"Disabled"
],
"icon": "font-awesome/fa-cloud"
},
{
"id": "df102c847233f0b5",
"type": "api-call-service",
"z": "e44b1e7a8ef7ae1d",
"name": "Set Scenes",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "evening_on_second_floor",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"sunset_lights\": 1\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2070,
"y": 240,
"wires": [
[]
]
},
{
"id": "134433d6e21dab5b",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Tony Presence",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "person.tony_stork",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 120,
"wires": [
[
"77857e77d43a9d2e",
"7169f007c32ccc46",
"e6bdfba61c73d081",
"77bb530373808a86"
],
[
"379edcf9fe985ebe"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "77857e77d43a9d2e",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Enable Texts (Tony)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tony"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 410,
"y": 100,
"wires": [
[
"8c7c1cd31a824cd5"
]
]
},
{
"id": "379edcf9fe985ebe",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Disable Texts (Tony)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tony"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 420,
"y": 280,
"wires": [
[
"24a89088d5503778"
]
]
},
{
"id": "49dbd6d6cba1b010",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Tina Presence",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "person.christina_stork",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
},
{
"property": "tinawork",
"propertyType": "msg",
"value": "tinawork",
"valueType": "global"
}
],
"x": 170,
"y": 420,
"wires": [
[
"a0c7649e26e66ddb",
"35d7371023527600",
"edaa6ff605ba6fa7",
"7ff36affdeacadba",
"77bb530373808a86"
],
[
"898659d514aa58fd"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "a0c7649e26e66ddb",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Enable Texts (Tina)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tina"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 410,
"y": 400,
"wires": [
[
"2851173db6835eda"
]
]
},
{
"id": "898659d514aa58fd",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Disable Texts (Tina)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_tina"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 410,
"y": 580,
"wires": [
[
"82c0fb65066f3b67"
]
]
},
{
"id": "cd4d8dd6b1d34f49",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Kallen Presence",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "person.kallen_stork",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 720,
"wires": [
[
"5193627a30d1b32d",
"77bb530373808a86",
"8a450e797b413418"
],
[
"8584a491587be9a2"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "5193627a30d1b32d",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Enable Texts (Kallen)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_kallen"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 420,
"y": 700,
"wires": [
[
"8e081e76e5f19ead"
]
]
},
{
"id": "fb1afc4c2078ca29",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Disable Texts (Kallen)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_kallen"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 640,
"y": 760,
"wires": [
[
"156d50efeaeb681c"
]
]
},
{
"id": "35d7371023527600",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Notify Tony",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 390,
"y": 520,
"wires": [
[
"bcdf2e5f1249631d"
]
]
},
{
"id": "9ae7e308f889137d",
"type": "wake on lan",
"z": "3abb5ae57afb4761",
"mac": "B4:2E:99:A8:CF:88",
"host": "192.168.1.255",
"udpport": 9,
"numpackets": 3,
"interval": 100,
"name": "Boot Tina's Computer",
"x": 1120,
"y": 340,
"wires": []
},
{
"id": "edaa6ff605ba6fa7",
"type": "change",
"z": "3abb5ae57afb4761",
"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": 460,
"wires": [
[
"10228956c46b8d7a"
]
],
"l": false
},
{
"id": "e6bdfba61c73d081",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Notify Tina",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 390,
"y": 220,
"wires": [
[
"41aa4436b55474b2"
]
]
},
{
"id": "7169f007c32ccc46",
"type": "change",
"z": "3abb5ae57afb4761",
"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",
"name": "Notify Kallen",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 590,
"y": 200,
"wires": [
[]
]
},
{
"id": "bcdf2e5f1249631d",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Notify Kallen",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 590,
"y": 500,
"wires": [
[]
]
},
{
"id": "7ff36affdeacadba",
"type": "switch",
"z": "3abb5ae57afb4761",
"name": "",
"property": "tinawork",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 335,
"y": 340,
"wires": [
[
"f167c4463ecaaf5c"
],
[],
[
"7992545819db1a42"
]
],
"l": false
},
{
"id": "7992545819db1a42",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Notify Tony",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 870,
"y": 400,
"wires": [
[]
]
},
{
"id": "f167c4463ecaaf5c",
"type": "subflow:7cc13ada.b6712c",
"z": "3abb5ae57afb4761",
"name": "",
"env": [
{
"name": "start",
"value": "15:00",
"type": "str"
},
{
"name": "stop",
"value": "17:00",
"type": "str"
}
],
"x": 860,
"y": 340,
"wires": [
[
"9ae7e308f889137d",
"8a22032494f84cae"
],
[]
]
},
{
"id": "76f6b8bed6de3f97",
"type": "link in",
"z": "3abb5ae57afb4761",
"name": "Schedule Settings - Receive",
"links": [
"fbf61a9e5ca3db94",
"39f78e9aa56bc51e"
],
"x": 755,
"y": 360,
"wires": [
[
"f167c4463ecaaf5c"
]
]
},
{
"id": "26f15fc8d75a4020",
"type": "link out",
"z": "3abb5ae57afb4761",
"name": "Presence Detection Output",
"mode": "link",
"links": [
"f34816b23181f21e"
],
"x": 985,
"y": 40,
"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",
"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"
},
{
"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": 180,
"y": 180,
"wires": [
[
"77857e77d43a9d2e"
],
[
"379edcf9fe985ebe"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "ec497068c3a61d02",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"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"
},
{
"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": 180,
"y": 480,
"wires": [
[
"a0c7649e26e66ddb"
],
[
"898659d514aa58fd"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "43048b96595e3e97",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"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"
},
{
"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": 190,
"y": 780,
"wires": [
[
"5193627a30d1b32d"
],
[
"8584a491587be9a2"
]
],
"outputLabels": [
"home",
"away"
]
},
{
"id": "0a039e097233b977",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "TV Notifications",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 600,
"y": 160,
"wires": [
[]
]
},
{
"id": "10228956c46b8d7a",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "TV Notifications",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 600,
"y": 460,
"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",
"name": "Front Door Open",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.front_door",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 840,
"y": 60,
"wires": [
[
"26f15fc8d75a4020",
"5f8b61ddc9963e99",
"025e65a78727f99e"
],
[
"26f15fc8d75a4020"
]
],
"outputLabels": [
"Open",
""
]
},
{
"id": "c46dfcaa9a2798f0",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Doorbell",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.front_doorbell_ding_mqtt",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 860,
"y": 240,
"wires": [
[
"26f15fc8d75a4020",
"025e65a78727f99e"
]
]
},
{
"id": "05547a934bbcab4d",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Motion Detected",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.front_doorbell_motion_mqtt",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 840,
"y": 180,
"wires": [
[
"26f15fc8d75a4020",
"025e65a78727f99e"
]
],
"outputLabels": [
"On"
]
},
{
"id": "ff44de8d65439a5f",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Back Door Open",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.back_door",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 840,
"y": 120,
"wires": [
[
"5f8b61ddc9963e99"
],
[]
],
"outputLabels": [
"Open",
""
]
},
{
"id": "5f8b61ddc9963e99",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "+1",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_number",
"service": "increment",
"areaId": [],
"deviceId": [],
"entityId": [
"input_number.{{whichdoor}}_door_opened_today"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1330,
"y": 140,
"wires": [
[]
]
},
{
"id": "8a22032494f84cae",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Lights Handler",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.tina_desk_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1100,
"y": 280,
"wires": [
[
"7fbab2c7cb7ecc92"
]
]
},
{
"id": "0ba46659c49cf39a",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Last Trigger",
"topic": "house/presence/outdoor/last_trigger",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 1290,
"y": 80,
"wires": []
},
{
"id": "025e65a78727f99e",
"type": "change",
"z": "3abb5ae57afb4761",
"name": "Set Payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "detect",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1090,
"y": 80,
"wires": [
[
"0ba46659c49cf39a"
]
]
},
{
"id": "028e16d90ac7433d",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Family Presence",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "group.family",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 1080,
"wires": [
[
"d5a9248680297b56"
],
[
"b8ef333da370f91e"
]
],
"outputLabels": [
"home",
"not_home"
]
},
{
"id": "d5a9248680297b56",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Enable Texts (All)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_all"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 450,
"y": 1080,
"wires": [
[
"66b7ec9a7e332cca"
]
]
},
{
"id": "b8ef333da370f91e",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Disable Texts (All)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_all"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 450,
"y": 1140,
"wires": [
[
"bebba6e7a61461b8"
]
]
},
{
"id": "351ac66c934832eb",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Parents Presence",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.parents_home",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 190,
"y": 840,
"wires": [
[
"331ed2d217025fd1"
],
[
"0eaa398b977e03b5"
]
]
},
{
"id": "df53af0726555079",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"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"
},
{
"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": 190,
"y": 900,
"wires": [
[
"331ed2d217025fd1"
],
[
"0eaa398b977e03b5"
]
]
},
{
"id": "331ed2d217025fd1",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Enable Texts (Parents)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_parents"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 460,
"y": 840,
"wires": [
[
"63dc161e193d33c5"
]
]
},
{
"id": "0eaa398b977e03b5",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Disable Texts (Parents)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_parents"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 470,
"y": 900,
"wires": [
[
"84a56bf51e79fd4d"
]
]
},
{
"id": "663b5401ea953d2d",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Nerds Presence",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.nerds_home",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "detect",
"propertyType": "msg",
"value": "presence",
"valueType": "str"
}
],
"x": 180,
"y": 960,
"wires": [
[
"a999c33047fc3b61"
],
[
"84a2692b31e7d7d8"
]
]
},
{
"id": "802ff36b76e55809",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"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"
},
{
"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": 190,
"y": 1020,
"wires": [
[
"a999c33047fc3b61"
],
[
"84a2692b31e7d7d8"
]
]
},
{
"id": "a999c33047fc3b61",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Enable Texts (Nerds)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_nerds"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 460,
"y": 960,
"wires": [
[
"bf5f6c5af1c02315"
]
]
},
{
"id": "84a2692b31e7d7d8",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Disable Texts (Nerds)",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.text_notify_nerds"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 460,
"y": 1020,
"wires": [
[
"dafcce5a61b19f8b"
]
]
},
{
"id": "1ac137ebc9f53e3c",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"name": "Family Presence?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "group.family",
"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": 190,
"y": 1140,
"wires": [
[
"d5a9248680297b56"
],
[
"b8ef333da370f91e"
]
]
},
{
"id": "788f7cfdfa2fdef9",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Basement Door",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.basement_studio_door",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 1060,
"y": 160,
"wires": [
[
"5f8b61ddc9963e99"
],
[]
],
"outputLabels": [
"Open",
""
]
},
{
"id": "e7a73ec2ec0f9018",
"type": "server-state-changed",
"z": "3abb5ae57afb4761",
"name": "Downstairs Bathroom Door",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.downstairs_bathroom_door",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": "downstairs_bathroom",
"valueType": "str"
}
],
"x": 1090,
"y": 220,
"wires": [
[
"5f8b61ddc9963e99"
],
[]
],
"outputLabels": [
"Open",
""
]
},
{
"id": "8c7c1cd31a824cd5",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"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",
"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",
"name": "MQTT Publish",
"topic": "house/presence/people/tina",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 600,
"y": 400,
"wires": []
},
{
"id": "82c0fb65066f3b67",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/tina",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 600,
"y": 580,
"wires": []
},
{
"id": "8e081e76e5f19ead",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/kallen",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 620,
"y": 700,
"wires": []
},
{
"id": "156d50efeaeb681c",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/kallen",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 840,
"y": 760,
"wires": []
},
{
"id": "63dc161e193d33c5",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/parents",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 840,
"wires": []
},
{
"id": "84a56bf51e79fd4d",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/parents",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 900,
"wires": []
},
{
"id": "bf5f6c5af1c02315",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/nerds",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 960,
"wires": []
},
{
"id": "dafcce5a61b19f8b",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/nerds",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1020,
"wires": []
},
{
"id": "66b7ec9a7e332cca",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/family",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1080,
"wires": []
},
{
"id": "bebba6e7a61461b8",
"type": "mqtt out",
"z": "3abb5ae57afb4761",
"name": "MQTT Publish",
"topic": "house/presence/people/groups/family",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 680,
"y": 1140,
"wires": []
},
{
"id": "8a450e797b413418",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Notify Parents",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 400,
"y": 640,
"wires": [
[]
]
},
{
"id": "7fbab2c7cb7ecc92",
"type": "api-current-state",
"z": "3abb5ae57afb4761",
"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": 1225,
"y": 280,
"wires": [
[
"5e72a180d8f0232d"
],
[]
],
"l": false
},
{
"id": "5e72a180d8f0232d",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Living Room Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1370,
"y": 280,
"wires": [
[]
]
},
{
"id": "8584a491587be9a2",
"type": "api-call-service",
"z": "3abb5ae57afb4761",
"name": "Bedroom Lights Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.kallen_bedroom_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 410,
"y": 760,
"wires": [
[
"fb1afc4c2078ca29"
]
]
},
{
"id": "d95d9964546768a5",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Downstairs Bathroom Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.downstairs_bathroom_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 140,
"y": 100,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "bdab41af28f2c7cd",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Living Room Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.living_room_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 110,
"y": 40,
"wires": [
[
"85e820743550308b"
]
]
},
{
"id": "7c224927d50a5f97",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Mud Room Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.mud_room_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 110,
"y": 160,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "e689231430e9c829",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Tina Lamp Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.tina_lamp_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 110,
"y": 220,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "5123a607588fa737",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.downstairs_bathroom_lights"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"output_location": "",
"output_location_type": "none",
"x": 530,
"y": 700,
"wires": [
[]
]
},
{
"id": "d790134891fedfcc",
"type": "subflow:a4ee891237e460a2",
"z": "eff21041cc941fef",
"name": "Main Scenes Handler",
"x": 580,
"y": 40,
"wires": []
},
{
"id": "b4751d926780b644",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Dining Room Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.dining_room_lamp_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": "dining_room_lamp",
"valueType": "str"
}
],
"x": 120,
"y": 280,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "74f9d2bf4a8c0b53",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Back Door Open",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.back_door",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 120,
"y": 800,
"wires": [
[
"f0ef9a565f72dcae"
],
[]
]
},
{
"id": "5e7a082800eeb73c",
"type": "api-call-service",
"z": "eff21041cc941fef",
"name": "Mud Room Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [
"mud_room"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 550,
"y": 800,
"wires": [
[]
]
},
{
"id": "f0ef9a565f72dcae",
"type": "api-current-state",
"z": "eff21041cc941fef",
"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": 330,
"y": 800,
"wires": [
[
"5e7a082800eeb73c"
],
[]
]
},
{
"id": "5a81041c4a1390b8",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Tina Desk Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.tina_desk_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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"
},
{
"property": "include",
"propertyType": "msg",
"value": "dining_room",
"valueType": "str"
}
],
"x": 110,
"y": 340,
"wires": [
[
"b19f4a996fd4c2ee",
"d790134891fedfcc"
]
]
},
{
"id": "b19f4a996fd4c2ee",
"type": "subflow:85c4f81ca9628aea",
"z": "eff21041cc941fef",
"name": "",
"x": 590,
"y": 340,
"wires": []
},
{
"id": "f84e6b5157e857cf",
"type": "function",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Delay",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar duration = states['input_number.downstairs_bathroom_lights_off_delay'].state\nvar newDuration = duration * 60\n\nmsg.duration = newDuration\n\nnode.status({fill:\"green\",shape:\"dot\",text:parseInt(duration) + ' minutes'});\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 640,
"wires": [
[
"b7d94cd0e420c650"
]
],
"icon": "node-red/timer.svg"
},
{
"id": "b7d94cd0e420c650",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.downstairs_bathroom_lights_timer"
],
"data": "{ \t \"duration\": msg.duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 530,
"y": 640,
"wires": [
[]
]
},
{
"id": "41a8d5ef20cf55d7",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "cancel",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.downstairs_bathroom_lights_timer"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 530,
"y": 580,
"wires": [
[]
]
},
{
"id": "3e40025ac99ec712",
"type": "server-events",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "timer.finished",
"exposeToHomeAssistant": false,
"eventData": "{\"entity_id\":\"timer.downstairs_bathroom_lights_timer\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 120,
"y": 700,
"wires": [
[
"5123a607588fa737"
]
]
},
{
"id": "8d2e7fb5f214879c",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Door Sensor",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.downstairs_bathroom_door",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 110,
"y": 640,
"wires": [
[
"b281061a4b08d2eb"
],
[
"f84e6b5157e857cf"
]
],
"outputLabels": [
"on",
"off"
]
},
{
"id": "b281061a4b08d2eb",
"type": "api-call-service",
"z": "eff21041cc941fef",
"g": "8aee4d340a136bac",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.downstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 300,
"y": 580,
"wires": [
[
"41a8d5ef20cf55d7"
]
]
},
{
"id": "85e820743550308b",
"type": "function",
"z": "eff21041cc941fef",
"name": "Adaptive",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar adaptBrt = states['switch.adaptive_lighting_adapt_brightness_living_room'].state\nvar 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} else if (adaptColor === 'on' && adaptBrt === 'off') {\n msg.brightness = 'false'\n msg.color = 'true'\n} else {\n msg.brightness = 'true'\n msg.color = 'true'\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 40,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "879ee8903841b8f0",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"name": "Upstairs Hallway Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.upstairs_hallway_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 280,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "bc2426cfcd5afbe8",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"name": "Upstairs Bathroom Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.upstairs_bathroom_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 40,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "a5498446c1edffa9",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"name": "Kallen Bedroom Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.kallen_bedroom_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 100,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "f28e7fd88f75041e",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"name": "Emma Bedroom Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.emma_bedroom_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 160,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "e1123236ee16fdaf",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"name": "Master Bedroom Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.master_bedroom_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 220,
"wires": [
[
"fba69dfc80829db7"
]
]
},
{
"id": "a1ee07ab20229b45",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Motion Detected",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.upstairs_bathroom_motion",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 240,
"y": 380,
"wires": [
[
"73bf42069fe27d3a"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "74c0ced4ac160364",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.upstairs_bathroom_lights"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"output_location": "",
"output_location_type": "none",
"x": 1030,
"y": 640,
"wires": [
[]
]
},
{
"id": "a17d58585048335d",
"type": "subflow:a4ee891237e460a2",
"z": "5e238cbbe6d612c9",
"name": "",
"x": 520,
"y": 40,
"wires": []
},
{
"id": "ea8536fc853a8af4",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Shower Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.shower_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": 580,
"y": 380,
"wires": [
[
"d2df58b074b9ba08"
],
[]
],
"outputLabels": [
"Off",
"On"
]
},
{
"id": "d2df58b074b9ba08",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Adaptive",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 790,
"y": 380,
"wires": [
[]
]
},
{
"id": "e19f97e448023ade",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Early Night",
"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": 830,
"y": 600,
"wires": [
[
"2d510442b2e79794"
],
[
"74c0ced4ac160364"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "38d9a4979f22e19f",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Late Night",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.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": 1310,
"y": 580,
"wires": [
[
"4888e5649042a6d1"
],
[
"83686fab02a3d825"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "d0cf87bd9c3ba0b1",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Single Nightlight",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Single Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1700,
"y": 520,
"wires": [
[]
]
},
{
"id": "83686fab02a3d825",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Nightlight",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1530,
"y": 620,
"wires": [
[]
]
},
{
"id": "853abef16fadc824",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Shower Mode",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.shower_mode",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 820,
"wires": [
[
"2ad7be43ccdbdeaf",
"31b8c8291d19ffc6",
"a1fa2d2d1f55af4b"
],
[
"31b8c8291d19ffc6",
"a1fa2d2d1f55af4b",
"a7a59e2f845b849c"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "bfcb013bbf11611c",
"type": "change",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Payload \"stop\"",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "stop",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 435,
"y": 480,
"wires": [
[
"34e2055344eea8fe"
]
],
"l": false
},
{
"id": "785049971f40b7b2",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Shower Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.shower_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": 580,
"y": 560,
"wires": [
[
"e19f97e448023ade"
],
[]
],
"outputLabels": [
"Off",
"On"
]
},
{
"id": "2ad7be43ccdbdeaf",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set to Bright",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Bright\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 470,
"y": 780,
"wires": [
[]
]
},
{
"id": "2e299ac73c696afc",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Early Night",
"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": 690,
"y": 900,
"wires": [
[
"d1ae15dff680b3b1"
],
[
"ea02f8930aa2c7aa"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "5d18c5d00181b011",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Nightlight",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1510,
"y": 860,
"wires": [
[]
]
},
{
"id": "ea02f8930aa2c7aa",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Turn Off Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.upstairs_bathroom_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 900,
"y": 920,
"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": 1025,
"y": 920,
"wires": [
[
"3941b4a5b3493461"
]
],
"l": false
},
{
"id": "3941b4a5b3493461",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Adaptive On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_upstairs_bathroom"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1150,
"y": 920,
"wires": [
[
"0b122b02cfb10c25"
]
]
},
{
"id": "0b122b02cfb10c25",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Scene Text",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.upstairs_bathroom_selected_scene"
],
"data": "{\t \"value\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1340,
"y": 920,
"wires": [
[]
]
},
{
"id": "d1ae15dff680b3b1",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Night Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.night_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "nightmode",
"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": 910,
"y": 860,
"wires": [
[
"3a25dfcae623ee00"
],
[
"3a25dfcae623ee00"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "39b90ceaed170ac8",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Single Nightlight",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Single Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1540,
"y": 800,
"wires": [
[]
]
},
{
"id": "31b8c8291d19ffc6",
"type": "link out",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Shower Mode Out",
"mode": "link",
"links": [
"7a7f626dce181b23"
],
"x": 425,
"y": 720,
"wires": []
},
{
"id": "55e84ccb73ae9b74",
"type": "link in",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Goodnight - Lighting",
"links": [
"60ce44747cf3e507"
],
"x": 135,
"y": 440,
"wires": [
[
"a1fa2d2d1f55af4b"
]
]
},
{
"id": "3a25dfcae623ee00",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Kallen Overnight",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.kallen_overnight",
"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": 1150,
"y": 860,
"wires": [
[
"ea02f8930aa2c7aa"
],
[
"fc4bcd1c117fa849"
]
]
},
{
"id": "fc4bcd1c117fa849",
"type": "switch",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "",
"property": "nightmode",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1345,
"y": 860,
"wires": [
[
"39b90ceaed170ac8"
],
[
"5d18c5d00181b011"
]
],
"l": false
},
{
"id": "017de174925e8c75",
"type": "server-state-changed",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Motion Detected",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.upstairs_bathroom_motion",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 1440,
"y": 440,
"wires": [
[
"2dc5f9d3e00f4ddc"
],
[]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "2d510442b2e79794",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Kallen Overnight",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.kallen_overnight",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "kallen-overnight",
"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": 1070,
"y": 580,
"wires": [
[
"38d9a4979f22e19f"
]
]
},
{
"id": "2dc5f9d3e00f4ddc",
"type": "stoptimer",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"duration": "2",
"units": "Minute",
"payloadtype": "num",
"payloadval": "0",
"name": "Wait 2 Minutes",
"x": 1680,
"y": 440,
"wires": [
[
"86922621398f4b79"
],
[]
]
},
{
"id": "86922621398f4b79",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.upstairs_bathroom_lights"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"output_location": "",
"output_location_type": "none",
"x": 1870,
"y": 440,
"wires": [
[]
]
},
{
"id": "4888e5649042a6d1",
"type": "switch",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "",
"property": "kallen-overnight",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1505,
"y": 520,
"wires": [
[
"2dc5f9d3e00f4ddc"
],
[
"d0cf87bd9c3ba0b1"
]
],
"l": false
},
{
"id": "73bf42069fe27d3a",
"type": "switch",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 395,
"y": 380,
"wires": [
[
"ea8536fc853a8af4",
"a1fa2d2d1f55af4b"
],
[
"32559cd9120b4916"
]
],
"l": false
},
{
"id": "32559cd9120b4916",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Delay",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_number.upstairs_bathroom_motion_off_delay",
"state_type": "num",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "duration",
"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": 620,
"wires": [
[
"1d03ecbe4448d224"
]
]
},
{
"id": "a1fa2d2d1f55af4b",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "cancel",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.upstairs_bathroom_motion_timer"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 270,
"y": 480,
"wires": [
[
"bfcb013bbf11611c"
]
]
},
{
"id": "1d03ecbe4448d224",
"type": "function",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Math",
"func": "msg.duration = msg.duration * 60\n\nnode.status({fill:\"green\",shape:\"dot\",text:msg.duration + \"s\"});\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 295,
"y": 620,
"wires": [
[
"da70285e80c3f195"
]
],
"l": false
},
{
"id": "463689442b9d2046",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.upstairs_bathroom_motion_timer"
],
"data": "{ \t \"duration\": msg.duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 650,
"y": 620,
"wires": [
[]
]
},
{
"id": "5350d2264880d0ad",
"type": "server-events",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "timer.finished",
"exposeToHomeAssistant": false,
"eventData": "{\"entity_id\":\"timer.upstairs_bathroom_motion_timer\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 360,
"y": 560,
"wires": [
[
"785049971f40b7b2"
]
]
},
{
"id": "da70285e80c3f195",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Check Shower Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.shower_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": 440,
"y": 620,
"wires": [
[
"463689442b9d2046"
],
[]
],
"outputLabels": [
"Off",
"On"
]
},
{
"id": "a7a59e2f845b849c",
"type": "api-current-state",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Motion On?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.upstairs_bathroom_occupied",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "motion",
"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": 470,
"y": 900,
"wires": [
[
"37f1c11c59a6ce16"
],
[
"2e299ac73c696afc"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "37f1c11c59a6ce16",
"type": "api-call-service",
"z": "5e238cbbe6d612c9",
"g": "eccca853a916b662",
"name": "Set Adaptive",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 670,
"y": 840,
"wires": [
[]
]
},
{
"id": "07049ae77b6751c6",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"name": "Basement Studio Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.basement_studio_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 130,
"y": 40,
"wires": [
[
"b334c603ae26bd9b"
]
]
},
{
"id": "5e31d6aacad206b8",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"name": "Light turned on",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "light.furnace_room_overhead",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 100,
"y": 100,
"wires": [
[
"dd3608c864d7007b"
],
[]
]
},
{
"id": "18599ab162ab225b",
"type": "change",
"z": "47f17992fab9b4f5",
"name": "Stop Timer",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "stop",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 290,
"y": 160,
"wires": [
[
"dd3608c864d7007b"
]
]
},
{
"id": "dd3608c864d7007b",
"type": "stoptimer",
"z": "47f17992fab9b4f5",
"duration": "60",
"units": "Minute",
"payloadtype": "num",
"payloadval": "0",
"name": "",
"x": 500,
"y": 100,
"wires": [
[
"e79ecc6c79946cc4"
],
[]
]
},
{
"id": "e79ecc6c79946cc4",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.furnace_room_overhead"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"output_location": "",
"output_location_type": "none",
"x": 690,
"y": 100,
"wires": [
[]
]
},
{
"id": "ab01d3d95c7ea717",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"name": "Light turned off",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "light.furnace_room_overhead",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 100,
"y": 160,
"wires": [
[
"18599ab162ab225b"
],
[]
]
},
{
"id": "8fa363e9e0c1b165",
"type": "comment",
"z": "47f17992fab9b4f5",
"name": "Furnace Room",
"info": "",
"x": 300,
"y": 100,
"wires": []
},
{
"id": "b334c603ae26bd9b",
"type": "subflow:74d3a55b70dc2d6c",
"z": "47f17992fab9b4f5",
"name": "",
"x": 410,
"y": 40,
"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": 180,
"y": 280,
"wires": [
[
"3c83c0ab0aa96e3d"
]
]
},
{
"id": "d45ac7361e128558",
"type": "lifx-pulse-effect",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "",
"api": "60eb53fb94cd64e4",
"selector": "group:Basement Studio",
"color": "red",
"from_color": "",
"period": "0.5",
"cycles": "5",
"persist": "false",
"power_on": "true",
"x": 970,
"y": 340,
"wires": []
},
{
"id": "fbe3667814a51f6f",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Front Door Opens",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.front_door",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 150,
"y": 340,
"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": 560,
"y": 340,
"wires": [
[
"981191938ab4ee2f"
],
[]
]
},
{
"id": "3563f62312975002",
"type": "delay",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"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": 915,
"y": 280,
"wires": [
[
"1a7c87f9713e5349"
]
],
"l": false
},
{
"id": "d4019d35bf5a5f98",
"type": "inject",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 180,
"y": 460,
"wires": [
[
"7b71cb1967ec5255"
]
]
},
{
"id": "29b9f573370571cf",
"type": "lifx-pulse-effect",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "",
"api": "60eb53fb94cd64e4",
"selector": "group:Basement Studio",
"color": "green",
"from_color": "",
"period": "0.25",
"cycles": "8",
"persist": "false",
"power_on": "true",
"x": 990,
"y": 520,
"wires": []
},
{
"id": "25e12d8e4a0a7f11",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Doorbell Rings",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.front_doorbell_ding_mqtt",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 140,
"y": 520,
"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": 560,
"y": 520,
"wires": [
[
"59af14a564176ce4"
],
[]
]
},
{
"id": "753ad45c3685897b",
"type": "delay",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"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": 935,
"y": 460,
"wires": [
[
"1e1891c23a6e7e64"
]
],
"l": false
},
{
"id": "d32a407e1c701563",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Hue Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.basement_short_lamp",
"light.basement_stairwell",
"light.basement_tall_lamp"
],
"data": "{\t \"color_name\":\"red\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 970,
"y": 400,
"wires": [
[]
]
},
{
"id": "58b54517ed812db3",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Hue Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.basement_short_lamp",
"light.basement_stairwell",
"light.basement_tall_lamp"
],
"data": "{\t \"color_name\":\"green\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 990,
"y": 580,
"wires": [
[]
]
},
{
"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": 780,
"y": 340,
"wires": [
[
"3563f62312975002",
"d45ac7361e128558",
"d32a407e1c701563"
],
[]
]
},
{
"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": 780,
"y": 520,
"wires": [
[
"753ad45c3685897b",
"29b9f573370571cf",
"58b54517ed812db3"
],
[]
]
},
{
"id": "3c83c0ab0aa96e3d",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Save State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "create",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 350,
"y": 340,
"wires": [
[
"ec543bc9adac3d08"
]
]
},
{
"id": "1a7c87f9713e5349",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Restore State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.basement_restore"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1040,
"y": 280,
"wires": [
[]
]
},
{
"id": "7b71cb1967ec5255",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Save State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "create",
"areaId": [],
"deviceId": [],
"entityId": [],
"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",
"x": 350,
"y": 520,
"wires": [
[
"e91c3392b59ff9d1"
]
]
},
{
"id": "1e1891c23a6e7e64",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "208284848b13b85b",
"name": "Restore State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.basement_restore"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1060,
"y": 460,
"wires": [
[]
]
},
{
"id": "1f5808147fa975cf",
"type": "link in",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Basement On - iOS",
"links": [
"572b2040be874f4e"
],
"x": 75,
"y": 740,
"wires": [
[
"11aabd786c07244f"
]
]
},
{
"id": "1966d10d8f4467c7",
"type": "server-state-changed",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Alexa Button",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_button.basement_on",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 130,
"y": 680,
"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": 130,
"y": 800,
"wires": [
[
"11aabd786c07244f"
]
]
},
{
"id": "b3bb08ff51e46985",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Alexa Actionable Notification",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "activate_alexa_actionable_notification",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"text\": \"<voice name='Brian'><prosody rate='150%'>Would you like me to turn on the computer for Collin?</prosody></voice>\",\t \"event_id\": \"actionable_notification_kallen_computer_on\",\t \"alexa_device\": $globalContext('lastAlexaEntityId')\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 620,
"y": 680,
"wires": [
[
"ea5306d6f92d9550"
]
]
},
{
"id": "0c7ef72bd0ef47d4",
"type": "delay",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"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": 255,
"y": 680,
"wires": [
[
"61cb79c998ee0b59"
]
],
"l": false
},
{
"id": "11aabd786c07244f",
"type": "function",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "user conversion",
"func": "var userTrigger = msg.payload.context.user_id\n\nif (userTrigger === \"c3909d27048140729f002aaef0391775\") {\n msg.user = \"tony\"\n} else if (userTrigger === \"f387a983651a4321a7411ff8cf36f949\") {\n msg.user = \"tina\"\n} else if (userTrigger === \"879b4c04e32841b3ad1d2763a11b4e70\") {\n msg.user = \"kallen\"\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 255,
"y": 740,
"wires": [
[
"795c53ad6642733a"
]
],
"l": false
},
{
"id": "795c53ad6642733a",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "iOS Actionable Notification",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"title\":\"Basement On\",\t \"message\": \"Should I turn on Kallen's computer?\",\t \"tag\":\"kallen_PC\",\t \"who\": msg.user,\t \"type\":\"alert\",\t \"actions\": [\t {\t \"action\": \"KALLEN_PC_YES\",\t \"title\": \"Yes\",\t \"icon\": \"mdi:thumb-up\"\t },\t {\t \"action\": \"KALLEN_PC_NO\",\t \"title\": \"No\",\t \"icon\": \"mdi:thumb-down\"\t }\t ]\t\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 620,
"y": 740,
"wires": [
[
"ea5306d6f92d9550"
]
]
},
{
"id": "ea5306d6f92d9550",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Tony PC On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tony_desktop_wake",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 870,
"y": 740,
"wires": [
[
"4829663e9913e2aa"
]
]
},
{
"id": "4829663e9913e2aa",
"type": "api-call-service",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "TV On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.basement_tv"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1030,
"y": 740,
"wires": [
[]
]
},
{
"id": "61cb79c998ee0b59",
"type": "change",
"z": "47f17992fab9b4f5",
"g": "550e5b2d99316b12",
"name": "Last Alexa",
"rules": [
{
"t": "set",
"p": "last_alexa",
"pt": "msg",
"to": "lastAlexaEntityId",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 680,
"wires": [
[
"b3bb08ff51e46985"
]
]
},
{
"id": "091390f43bfeddf5",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Turn on light",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.front_porch_light"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"output_location": "",
"output_location_type": "none",
"x": 790,
"y": 120,
"wires": [
[
"3a5bb57569e07beb"
]
]
},
{
"id": "7a7229eb69c9b1a3",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Turn off light",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.front_porch_light"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"output_location": "",
"output_location_type": "none",
"x": 1250,
"y": 260,
"wires": [
[]
]
},
{
"id": "f34816b23181f21e",
"type": "link in",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Porch Light Input",
"links": [
"26f15fc8d75a4020"
],
"x": 125,
"y": 120,
"wires": [
[
"cfdcc7c9c168dc17"
]
]
},
{
"id": "de4f1b15ce906809",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Set Adaptive",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.front_porch_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1130,
"y": 60,
"wires": [
[
"bd75b077a1c76fce"
]
]
},
{
"id": "bd75b077a1c76fce",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"d": true,
"g": "eeafd13be593ae69",
"name": "Turn off Delivery Mode",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.delivery_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1340,
"y": 60,
"wires": [
[]
]
},
{
"id": "b69eeb738bbd4bdb",
"type": "server-state-changed",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Porch Automation Stop",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.front_porch_light_on",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 180,
"y": 60,
"wires": [
[
"459433738b64d14d"
],
[]
]
},
{
"id": "cfdcc7c9c168dc17",
"type": "switch",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "On/Off",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 230,
"y": 120,
"wires": [
[
"16029ccf061bdd10",
"459433738b64d14d"
],
[
"76815f07ec2f3eef"
]
]
},
{
"id": "16029ccf061bdd10",
"type": "switch",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Method",
"property": "detect",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "presence",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 380,
"y": 120,
"wires": [
[
"c7a8df4ebeb3b5c5",
"77759257dd9c9465"
],
[
"77759257dd9c9465"
]
]
},
{
"id": "d2751bc2cfc5af8f",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Set Adaptive",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.front_porch_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1130,
"y": 120,
"wires": [
[]
]
},
{
"id": "435280acadb9f364",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Holiday Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.animated_scene_{{holiday}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1440,
"y": 200,
"wires": [
[]
]
},
{
"id": "ec5937bc60874009",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Animations Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.animated_scene_{{holiday}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 800,
"y": 60,
"wires": [
[]
]
},
{
"id": "defcae57f9916394",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Adaptive Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_front_porch"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1250,
"y": 200,
"wires": [
[
"435280acadb9f364"
]
]
},
{
"id": "459433738b64d14d",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Cancel Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "cancel",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.front_porch_motion_timer"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 390,
"y": 60,
"wires": [
[]
]
},
{
"id": "a2ec35a79d79bf2f",
"type": "api-call-service",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.front_porch_motion_timer"
],
"data": "{\t \"duration\": msg.duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 510,
"y": 260,
"wires": [
[]
]
},
{
"id": "9a8c39dc1a0c20e6",
"type": "server-events",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Timer Finished",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "timer.finished",
"exposeToHomeAssistant": false,
"eventData": "{\"entity_id\":\"timer.front_porch_motion_timer\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 860,
"y": 260,
"wires": [
[
"f5fb96bf1a33b3cd"
]
]
},
{
"id": "8c29a2e1a06c5524",
"type": "server-state-changed",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Delivery Mode Off",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.delivery_mode",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 870,
"y": 200,
"wires": [
[
"f5fb96bf1a33b3cd"
],
[]
]
},
{
"id": "c7a8df4ebeb3b5c5",
"type": "delay",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "",
"pauseType": "delay",
"timeout": "10",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 245,
"y": 260,
"wires": [
[
"76815f07ec2f3eef"
]
],
"l": false
},
{
"id": "77759257dd9c9465",
"type": "function",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Check Parameters",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar earlyNightMode = states['binary_sensor.early_night_mode'].state\nvar frontPorchToggle = states['input_boolean.front_porch_light_on'].state\nvar holidaymode = states['input_boolean.holiday_mode'].state\nvar currentholiday = states['input_select.holiday_animation'].state\nvar holiday = currentholiday.toLowerCase()\n\nif (earlyNightMode === 'on' && frontPorchToggle === 'on') {\n if (holidaymode === 'on') {\n msg.holiday = holiday\n node.status({fill:\"blue\",shape:\"dot\",text:\"Holiday On\"});\n return[msg,null]\n } else {\n node.status({fill:\"green\",shape:\"dot\",text:\"Holiday Off\"});\n return[null,msg]\n }\n} else {\n if (frontPorchToggle === 'off') {\n node.status({ fill: \"red\", shape: \"ring\", text: \"Disabled\" });\n } else if (earlyNightMode === 'off') {\n node.status({ fill: \"red\", shape: \"ring\", text: \"Daytime\" });\n }\n return null\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 590,
"y": 120,
"wires": [
[
"ec5937bc60874009",
"091390f43bfeddf5"
],
[
"091390f43bfeddf5"
]
],
"outputLabels": [
"Holiday",
"Otherwise"
],
"icon": "font-awesome/fa-check"
},
{
"id": "3a5bb57569e07beb",
"type": "function",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "If Motion",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar deliveryMode = states['input_boolean.delivery_mode'].state\nvar detect = msg.detect\n\nif (detect === 'motion') {\n if (deliveryMode === 'on') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Motion/Delivery\"});\n return[msg,null]\n } else {\n node.status({});\n return null\n }\n} else {\n node.status({fill:\"green\",shape:\"dot\",text:\"Not Motion\"});\n return[null,msg]\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 960,
"y": 120,
"wires": [
[
"de4f1b15ce906809"
],
[
"d2751bc2cfc5af8f"
]
],
"outputLabels": [
"Motion",
"Otherwise"
],
"icon": "node-red-contrib-huemagic/hue-motion.svg"
},
{
"id": "76815f07ec2f3eef",
"type": "function",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Delay",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar delay = states['input_number.front_porch_motion_off_delay'].state\nvar duration = delay * 60\nvar lights = states['light.front_porch_light'].state\n\nmsg.duration = duration\n\nif (lights === 'on') {\n node.status({ fill: \"green\", shape: \"dot\", text: parseInt(delay) + \" minutes\" });\n return msg;\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Light Off\"});\n return null\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 350,
"y": 260,
"wires": [
[
"a2ec35a79d79bf2f"
]
],
"icon": "font-awesome/fa-tree"
},
{
"id": "f5fb96bf1a33b3cd",
"type": "function",
"z": "b5717a86ce55bc29",
"g": "eeafd13be593ae69",
"name": "Shut Off",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar frontPorchToggle = states['input_boolean.front_porch_light_on'].state\nvar deliveryMode = states['input_boolean.delivery_mode'].state\nvar holidaymode = states['input_boolean.holiday_mode'].state\nvar currentholiday = states['input_select.holiday_animation'].state\nvar holiday = currentholiday.toLowerCase()\n\nif (frontPorchToggle === 'on' && deliveryMode === 'off') {\n if (holidaymode === 'on') {\n node.status({fill:\"blue\",shape:\"dot\",text:\"Holiday On\"});\n return[msg,null]\n } else {\n node.status({fill:\"green\",shape:\"dot\",text:\"Holiday Off\"});\n return[null,msg]\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Disabled\"});\n return null\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1080,
"y": 260,
"wires": [
[
"defcae57f9916394"
],
[
"7a7229eb69c9b1a3"
]
],
"outputLabels": [
"Holiday",
"Otherwise"
],
"icon": "font-awesome/fa-power-off"
},
{
"id": "af64b56e28c93907",
"type": "server-state-changed",
"z": "b5717a86ce55bc29",
"name": "Front Porch Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.front_porch_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": "front_porch",
"valueType": "str"
}
],
"x": 170,
"y": 360,
"wires": [
[
"3747d0c21057f3a6"
]
]
},
{
"id": "3747d0c21057f3a6",
"type": "subflow:a4ee891237e460a2",
"z": "b5717a86ce55bc29",
"name": "",
"x": 400,
"y": 360,
"wires": []
},
{
"id": "cd04bdb407311eb5",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start YouTube in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "137fe3f66779bb13",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 180,
"y": 60,
"wires": [
[
"31cb558d6ee383c4"
]
]
},
{
"id": "7611921cadb91b1e",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Dim Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.dining_room_lamp_scenes"
],
"data": "{\t \"option\":\"Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 590,
"y": 980,
"wires": [
[
"8b53b9f4d5ba0bf0"
]
]
},
{
"id": "cac7cc3111526a67",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start Youtube",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"com.google.android.youtube.tv\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 760,
"y": 60,
"wires": [
[]
]
},
{
"id": "7d8d5376e990d357",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop YouTube in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "eaeb8fcb37fa8585",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 180,
"y": 120,
"wires": [
[
"0b79d297a8596c37"
]
]
},
{
"id": "3a29cecbefa6cbe2",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Reset Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.dining_room_lamp_scenes",
"input_select.living_room_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 950,
"y": 1060,
"wires": [
[]
]
},
{
"id": "ab4c69753bfc36f5",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop Youtube",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"!com.google.android.youtube.tv\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 750,
"y": 120,
"wires": [
[]
]
},
{
"id": "b18c7a21fc449d35",
"type": "alexa-home",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"conf": "c8312629c112d43a",
"device": "171565",
"acknoledge": true,
"name": "Living Room Youtube",
"topic": "",
"x": 160,
"y": 180,
"wires": [
[
"936091f71dc880b3"
]
]
},
{
"id": "936091f71dc880b3",
"type": "switch",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "true",
"vt": "str"
},
{
"t": "cont",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 315,
"y": 180,
"wires": [
[
"31cb558d6ee383c4"
],
[
"0b79d297a8596c37"
]
],
"l": false
},
{
"id": "59350a1f38e3e04a",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start Twitch in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "266a447bcb22dad6",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 170,
"y": 240,
"wires": [
[
"13d5c047c41f60ba"
]
]
},
{
"id": "6c78852a9c604f64",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop Twitch in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "73718265ac9a1389",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 170,
"y": 300,
"wires": [
[
"40817f8c9eeae5fe"
]
]
},
{
"id": "abe997d5df095480",
"type": "alexa-home",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"conf": "c8312629c112d43a",
"device": "171566",
"acknoledge": true,
"name": "Living Room Twitch",
"topic": "",
"x": 150,
"y": 360,
"wires": [
[
"a18b6c8c026995d6"
]
]
},
{
"id": "a18b6c8c026995d6",
"type": "switch",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "true",
"vt": "str"
},
{
"t": "cont",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 315,
"y": 360,
"wires": [
[
"13d5c047c41f60ba"
],
[
"40817f8c9eeae5fe"
]
],
"l": false
},
{
"id": "db54e97573a07fc4",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start Twitch",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"tv.twitch.android.app\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 750,
"y": 180,
"wires": [
[]
]
},
{
"id": "77f2aae15fa1250d",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop Twitch",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"!tv.twitch.android.app\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 750,
"y": 240,
"wires": [
[]
]
},
{
"id": "9e36b04d6063c234",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start Plex in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "5d20015e8a70767a",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 170,
"y": 420,
"wires": [
[
"b8995a85f5d34268"
]
]
},
{
"id": "7f82b9d6d835e09b",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop Plex in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "c1da63449b303e84",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 170,
"y": 480,
"wires": [
[
"85bd556a614f0455"
]
]
},
{
"id": "158b197a42fed757",
"type": "alexa-home",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"conf": "c8312629c112d43a",
"device": "171567",
"acknoledge": true,
"name": "Living Room Plex",
"topic": "",
"x": 140,
"y": 540,
"wires": [
[
"e549712aaaceb285"
]
]
},
{
"id": "e549712aaaceb285",
"type": "switch",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "true",
"vt": "str"
},
{
"t": "cont",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 315,
"y": 540,
"wires": [
[
"b8995a85f5d34268"
],
[
"85bd556a614f0455"
]
],
"l": false
},
{
"id": "be5bdfc3c12b05da",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start Plex",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"com.plexapp.android\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 740,
"y": 300,
"wires": [
[]
]
},
{
"id": "728ab818393de52d",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop Plex",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"!com.plexapp.android\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 740,
"y": 360,
"wires": [
[]
]
},
{
"id": "960884b0fd23e69b",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start Netflix in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "eb813ad296813ab2",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 170,
"y": 600,
"wires": [
[
"c95d487f9fbe14ce"
]
]
},
{
"id": "61fdabfde220fbcc",
"type": "ha-button",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop Netflix in Living Room",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "2a115fc593b081ac",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 170,
"y": 660,
"wires": [
[
"318bee4424125dd5"
]
]
},
{
"id": "42b706dd4afe3e42",
"type": "alexa-home",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"conf": "c8312629c112d43a",
"device": "171568",
"acknoledge": true,
"name": "Living Room Netflix",
"topic": "",
"x": 150,
"y": 720,
"wires": [
[
"9a605b80513eba44"
]
]
},
{
"id": "9a605b80513eba44",
"type": "switch",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "true",
"vt": "str"
},
{
"t": "cont",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 315,
"y": 720,
"wires": [
[
"c95d487f9fbe14ce"
],
[
"318bee4424125dd5"
]
],
"l": false
},
{
"id": "0b860dc2f7db3ba0",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Start Netflix",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"com.netflix.ninja\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 750,
"y": 420,
"wires": [
[]
]
},
{
"id": "51d86d6064f084d2",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "f55a52c40b8b8749",
"name": "Stop Netflix",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "select_source",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.living_room_tv"
],
"data": "{\t \"source\":\"!com.netflix.ninja\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 750,
"y": 480,
"wires": [
[]
]
},
{
"id": "4a2031f363418db1",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Set Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.living_room_scenes"
],
"data": "{\t \"option\":\"Tokyo\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 950,
"y": 940,
"wires": [
[]
]
},
{
"id": "984386fa0a6369d6",
"type": "server-state-changed",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Living Room TV Current App",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.living_room_tv_current_app",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 180,
"y": 860,
"wires": [
[
"0beae13503166379"
]
]
},
{
"id": "0beae13503166379",
"type": "function",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Processing",
"func": "var app = msg.payload\nvar payload = {}\n\nif (app === \"YouTube\") {\n payload = \"start\"\n} else if (app === \"Netflix\") {\n payload = \"start\"\n} else if (app === \"Plex\") {\n payload = \"start\"\n} else if (app === \"Twitch\") {\n payload = \"start\"\n} else if (app === \"Hulu\") {\n payload = \"start\"\n} else {\n payload = \"stop\"\n}\n\nmsg.payload = payload\n\nif (payload === 'start') {\n node.status({fill:\"green\",shape:\"dot\",text:app});\n return[msg,null]\n} else if (payload === 'stop') {\n node.status({fill:\"red\",shape:\"ring\",text:\"Stopped\"});\n return[null,msg]\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 860,
"wires": [
[
"6c77ade442a47a30"
],
[
"6392f2f0586d988a"
]
],
"outputLabels": [
"Start",
"Stop"
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "6c77ade442a47a30",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Entertainment Mode On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.living_room_entertainment_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 630,
"y": 820,
"wires": [
[]
]
},
{
"id": "6392f2f0586d988a",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Entertainment Mode Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.living_room_entertainment_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 630,
"y": 880,
"wires": [
[]
]
},
{
"id": "e505e9f24bf919dd",
"type": "server-state-changed",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Entertainment Mode State",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.living_room_entertainment_mode",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 170,
"y": 980,
"wires": [
[
"346379575efad516"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "9efd5346a1ca1972",
"type": "server-state-changed",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Detect Pause",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "media_player.living_room_tv",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": true,
"for": "0",
"forType": "num",
"forUnits": "seconds",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 130,
"y": 1140,
"wires": [
[
"8b0b39deb5142557"
]
],
"outputLabels": [
"paused",
"playing"
]
},
{
"id": "8b53b9f4d5ba0bf0",
"type": "api-call-service",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Dynamic On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.living_room_dynamic_scenes"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 770,
"y": 960,
"wires": [
[
"4a2031f363418db1"
]
]
},
{
"id": "cc8f6ab710549be2",
"type": "stoptimer",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"duration": "15",
"units": "Second",
"payloadtype": "num",
"payloadval": "0",
"name": "",
"x": 510,
"y": 1180,
"wires": [
[
"7cb8056b3b41a9e8"
],
[]
]
},
{
"id": "346379575efad516",
"type": "function",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar allowed = states['input_boolean.living_room_entertainment_control'].state\nvar lights = states['light.living_room_lights'].state\nvar selectedScene = states['input_text.living_room_selected_scene'].state\nvar payload = msg.payload\n\nif (allowed === 'on' && lights === 'on') {\n if (payload === 'on') {\n if (selectedScene != 'Tokyo') {\n node.status({fill:\"green\",shape:\"dot\",text:\"On\"});\n return[msg,null]\n } else if (selectedScene === 'Tokyo') {\n node.status({fill:\"yellow\",shape:\"ring\",text:\"Scene already set\"});\n return null\n }\n } else if (payload === 'off') {\n node.status({fill:\"red\",shape:\"ring\",text:\"Off\"});\n return[null,msg]\n }\n} else {\n node.status({fill:\"grey\",shape:\"dot\",text:\"Blocked\"});\n return null\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 980,
"wires": [
[
"7611921cadb91b1e"
],
[
"3a29cecbefa6cbe2"
]
],
"outputLabels": [
"On",
"Off"
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "8b0b39deb5142557",
"type": "function",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar allowed = states['input_boolean.living_room_entertainment_control'].state\nvar lights = states['light.living_room_lights'].state\nvar active = states['input_boolean.living_room_entertainment_mode'].state\nvar selectedScene = states['input_text.living_room_selected_scene'].state\nvar payload = msg.payload\nvar stopMsg = {\n \"payload\":\"stop\"\n}\n\nif (allowed === 'on' && lights === 'on') {\n if (payload === 'paused') {\n node.status({fill:\"blue\",shape:\"dot\",text:\"Paused\"});\n return [null,msg,null]\n } else if (payload === 'playing') {\n if (allowed === 'on' && lights === 'on' && active === 'on' && selectedScene != 'Tokyo') {\n node.status({ fill: \"green\", shape: \"dot\", text: \"Playing\" });\n return[msg,null,stopMsg]\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Blocked\"});\n return[null,null,stopMsg]\n }\n } else {\n node.status({fill:\"grey\",shape:\"dot\",text:\"Timer Stopped\"});\n return[null,null,stopMsg]\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Blocked\"});\n return null\n}",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 310,
"y": 1140,
"wires": [
[
"7611921cadb91b1e"
],
[
"cc8f6ab710549be2"
],
[
"cc8f6ab710549be2"
]
],
"outputLabels": [
"Playing",
"Paused",
"Stop Timer"
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "7cb8056b3b41a9e8",
"type": "function",
"z": "b0286fae9f2ce547",
"g": "ff6d8150e8d5e606",
"name": "Check",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar active = states['input_boolean.living_room_entertainment_mode'].state\nvar lights = states['light.living_room_lights'].state\n\nif (active === 'on' && lights === 'on') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Sent\"});\n return msg;\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Blocked\"});\n return null\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 690,
"y": 1180,
"wires": [
[
"3a29cecbefa6cbe2"
]
],
"icon": "font-awesome/fa-check"
},
{
"id": "8e399b2a287a0905",
"type": "ha-time",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Master Bedroom Cooling",
"server": "9e87348d.9c1c48",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityId": "input_datetime.master_bedroom_cooling",
"property": "",
"offset": "0",
"offsetType": "num",
"offsetUnits": "minutes",
"randomOffset": false,
"repeatDaily": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
},
{
"property": "topic",
"propertyType": "msg",
"value": "mrbedroom-cooling",
"valueType": "str"
}
],
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"debugenabled": false,
"x": 170,
"y": 220,
"wires": [
[
"ed6649edf0128951"
]
]
},
{
"id": "314752dbc6fd170d",
"type": "ha-time",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Master Bedroom Fan",
"server": "9e87348d.9c1c48",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityId": "input_datetime.master_bedroom_fan",
"property": "",
"offset": "0",
"offsetType": "num",
"offsetUnits": "minutes",
"randomOffset": false,
"repeatDaily": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
},
{
"property": "topic",
"propertyType": "msg",
"value": "mrbedroom-fan",
"valueType": "str"
}
],
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"debugenabled": false,
"x": 160,
"y": 280,
"wires": [
[
"ed6649edf0128951"
]
]
},
{
"id": "d7261338e6b907f1",
"type": "ha-time",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Master Bedroom Wakeup",
"server": "9e87348d.9c1c48",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityId": "input_datetime.master_bedroom_wakeup",
"property": "",
"offset": "0",
"offsetType": "num",
"offsetUnits": "minutes",
"randomOffset": false,
"repeatDaily": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
},
{
"property": "topic",
"propertyType": "msg",
"value": "mrbedroom-wakeup",
"valueType": "str"
}
],
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"debugenabled": false,
"x": 170,
"y": 340,
"wires": [
[
"ed6649edf0128951"
]
]
},
{
"id": "6fb7131d5534350c",
"type": "api-current-state",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Scheduled Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "Fan",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_select.scheduled_climate_mode_master_bedroom_fan",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "sched_fan",
"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": 850,
"y": 320,
"wires": [
[
"bf1b0d6542ef6b38"
],
[]
]
},
{
"id": "fd0a309681a536de",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set to Cool",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"cool\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1230,
"y": 180,
"wires": [
[
"20f407c978d14863"
]
]
},
{
"id": "444acaf315688ac9",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Temp",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_temperature",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"temperature\": msg.nighttemp\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1560,
"y": 140,
"wires": [
[
"0f6d425791646818"
]
]
},
{
"id": "40dc1e930b887eb7",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set to Fan",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"fan_only\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1230,
"y": 260,
"wires": [
[
"36c671c1520680e7"
]
]
},
{
"id": "bf1b0d6542ef6b38",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Turn Fan On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.master_bedroom_fan"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1230,
"y": 320,
"wires": [
[
"a8ef744455bb4c0a"
]
]
},
{
"id": "24c3166123d5dad0",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set to Cool",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"cool\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1510,
"y": 440,
"wires": [
[
"efe1917ebdcef673"
]
]
},
{
"id": "40f52ef656550cf6",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Temp",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_temperature",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"temperature\": msg.daytemp\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1840,
"y": 400,
"wires": [
[
"bc9d4a0d7a7c5c79"
]
]
},
{
"id": "b14bcbf98b7e9f91",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Turn off AC",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"off\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1830,
"y": 480,
"wires": [
[]
]
},
{
"id": "e473da127624f191",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Turn off Fan",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.master_bedroom_echo_dot_do_not_disturb_switch",
"switch.master_bedroom_fan"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1270,
"y": 520,
"wires": [
[]
]
},
{
"id": "ed6649edf0128951",
"type": "api-current-state",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Enabled?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.master_bedroom_nighttime_protocol",
"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": 380,
"y": 320,
"wires": [
[
"a10629857d60f774"
],
[]
]
},
{
"id": "20f407c978d14863",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Eco Set",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_preset_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"preset_mode\": msg.preset\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1400,
"y": 160,
"wires": [
[
"444acaf315688ac9"
]
]
},
{
"id": "36c671c1520680e7",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Eco Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_preset_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"preset_mode\":\"none\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1400,
"y": 240,
"wires": [
[
"09a31110ed0a8630"
]
]
},
{
"id": "efe1917ebdcef673",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Eco On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_preset_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"preset_mode\":\"eco\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1680,
"y": 420,
"wires": [
[
"40f52ef656550cf6"
]
]
},
{
"id": "d5784e5baa80a105",
"type": "ha-time",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Kallen Bedtime",
"server": "9e87348d.9c1c48",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityId": "input_datetime.kallen_bedtime",
"property": "",
"offset": "0",
"offsetType": "num",
"offsetUnits": "minutes",
"randomOffset": false,
"repeatDaily": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
},
{
"property": "topic",
"propertyType": "msg",
"value": "kallen-night",
"valueType": "str"
},
{
"property": "toggle",
"propertyType": "msg",
"value": "on",
"valueType": "str"
}
],
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"debugenabled": false,
"x": 120,
"y": 820,
"wires": [
[
"d6b56cb65c2ff140"
]
]
},
{
"id": "9e1418c3e9595312",
"type": "ha-time",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Kallen Wakeup",
"server": "9e87348d.9c1c48",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityId": "input_datetime.kallen_wakeup_time",
"property": "",
"offset": "0",
"offsetType": "num",
"offsetUnits": "minutes",
"randomOffset": false,
"repeatDaily": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
},
{
"property": "topic",
"propertyType": "msg",
"value": "kallen-morning",
"valueType": "str"
},
{
"property": "toggle",
"propertyType": "msg",
"value": "off",
"valueType": "str"
}
],
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"debugenabled": false,
"x": 120,
"y": 880,
"wires": [
[
"d6b56cb65c2ff140"
]
]
},
{
"id": "99e74844b8fd9d1a",
"type": "delay",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "",
"pauseType": "delay",
"timeout": "10",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 695,
"y": 1080,
"wires": [
[
"6418c17768ed363d"
]
],
"l": false
},
{
"id": "6418c17768ed363d",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "White Noise On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.white_noise_kallen_bedroom"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 820,
"y": 1080,
"wires": [
[]
]
},
{
"id": "2f3666d288d77ad1",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [
"kallen_bedroom",
"upstairs_bathroom",
"upstairs_hallway"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 500,
"y": 1120,
"wires": [
[]
]
},
{
"id": "265b54394cc42f53",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Fan On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "fan",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"fan.kallen_bedroom_fan"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 640,
"y": 1200,
"wires": [
[
"43ea4107912bf0f2"
]
]
},
{
"id": "d132875202e85038",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Fan Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "fan",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"fan.kallen_bedroom_fan"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 680,
"y": 940,
"wires": [
[
"a6f4af0aaabcc2c1"
]
]
},
{
"id": "a6f4af0aaabcc2c1",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Booleans Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.white_noise_kallen_bedroom"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 850,
"y": 940,
"wires": [
[]
]
},
{
"id": "b4dbbf788c5a30d2",
"type": "subflow:6429099c4571dd6b",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "",
"x": 1020,
"y": 1200,
"wires": [
[]
]
},
{
"id": "dc440dfc78c41b8a",
"type": "link in",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Good Morning - Climate",
"links": [
"5c9c73b7adb72896"
],
"x": 415,
"y": 280,
"wires": [
[
"a10629857d60f774"
]
]
},
{
"id": "1aa901d26ce8ac46",
"type": "ha-button",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "MB Night Mode",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "be9ed28696adcdb0",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "manual-night",
"valueType": "str"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 200,
"y": 400,
"wires": [
[
"a10629857d60f774"
]
]
},
{
"id": "21001f5409130f44",
"type": "ha-button",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "MB Day Mode",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "59cb8692ed7accd1",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "manual-day",
"valueType": "str"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 210,
"y": 460,
"wires": [
[
"a10629857d60f774"
]
]
},
{
"id": "9179e99207e9f8f3",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Temp",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_temperature",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"temperature\": msg.bedtemp\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 720,
"y": 60,
"wires": [
[
"6ed7feb3956038ed"
]
]
},
{
"id": "1f7ac875e593d434",
"type": "ha-button",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "MB Bedtime Mode",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "9c63750f16f845ea",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "manual-bedtime",
"valueType": "str"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 130,
"y": 120,
"wires": [
[
"a3ef2faca9922113"
]
]
},
{
"id": "bc592ba259667f9d",
"type": "link in",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Goodnight - Climate",
"links": [
"028351e8c4e2faf5"
],
"x": 195,
"y": 60,
"wires": [
[
"a3ef2faca9922113"
]
]
},
{
"id": "404c42d6fea46839",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set to Cool",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"cool\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 530,
"y": 120,
"wires": [
[
"9179e99207e9f8f3"
]
]
},
{
"id": "7a7f626dce181b23",
"type": "link in",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Shower Mode - Climate",
"links": [
"31b8c8291d19ffc6"
],
"x": 145,
"y": 540,
"wires": [
[
"9c01880c6319d29b"
]
]
},
{
"id": "f541ad53e32f703b",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set to Dry",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"dry\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 480,
"y": 480,
"wires": [
[
"66e85878d60c7d65"
]
]
},
{
"id": "66e85878d60c7d65",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Eco Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_preset_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"preset_mode\":\"none\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 640,
"y": 480,
"wires": [
[
"bcba065aa5ecb2be"
]
]
},
{
"id": "bcba065aa5ecb2be",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Temp",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_temperature",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"temperature\": msg.nighttemp\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 800,
"y": 480,
"wires": [
[]
]
},
{
"id": "10d9b30654ef759c",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Turn on boolean",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.master_bedroom_cooling_on"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 840,
"y": 200,
"wires": [
[
"e2ad91fc748ca519"
]
]
},
{
"id": "0a783dc1cb68b4bf",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Turn off boolean",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.master_bedroom_cooling_on"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 840,
"y": 420,
"wires": [
[
"f8cc9d6657bff329"
]
]
},
{
"id": "11ed2afea8133e8f",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set night mode",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "button",
"service": "press",
"areaId": [],
"deviceId": [],
"entityId": [
"button.master_bedroom_night_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 500,
"y": 600,
"wires": [
[]
]
},
{
"id": "be70ec3d9b852b89",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set day mode",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "button",
"service": "press",
"areaId": [],
"deviceId": [],
"entityId": [
"button.master_bedroom_day_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 500,
"y": 660,
"wires": [
[]
]
},
{
"id": "6c06c2eec1583c66",
"type": "comment",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Shower Mode",
"info": "",
"x": 290,
"y": 620,
"wires": []
},
{
"id": "0c680585239e7f60",
"type": "comment",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Goodnight",
"info": "",
"x": 100,
"y": 80,
"wires": []
},
{
"id": "e2581a5f3f4888df",
"type": "comment",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Main Flow",
"info": "",
"x": 540,
"y": 260,
"wires": []
},
{
"id": "1dfb0bcc98f1457b",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set to Fan",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"fan_only\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1010,
"y": 620,
"wires": [
[
"096369136e9e607f"
]
]
},
{
"id": "096369136e9e607f",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Eco Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_preset_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"preset_mode\":\"none\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1180,
"y": 620,
"wires": [
[]
]
},
{
"id": "783cfb381b70afc5",
"type": "ha-button",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "A/C Fan Only",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "d3f8c4466cc1deeb",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 830,
"y": 620,
"wires": [
[
"1dfb0bcc98f1457b"
]
]
},
{
"id": "5008caa0192238f7",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set to Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"hvac_mode\":\"off\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1400,
"y": 80,
"wires": [
[]
]
},
{
"id": "09a31110ed0a8630",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Fan to Auto",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_fan_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"fan_mode\":\"Auto\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1580,
"y": 220,
"wires": [
[
"a8ef744455bb4c0a"
]
]
},
{
"id": "0f6d425791646818",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Fan to Auto",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_fan_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"fan_mode\":\"Auto\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1740,
"y": 120,
"wires": [
[
"a8ef744455bb4c0a"
]
]
},
{
"id": "bc9d4a0d7a7c5c79",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Fan to Auto",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_fan_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"fan_mode\":\"Auto\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2020,
"y": 380,
"wires": [
[]
]
},
{
"id": "67509a5554fc091f",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Fan to Auto",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_fan_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"fan_mode\":\"Auto\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1060,
"y": 60,
"wires": [
[]
]
},
{
"id": "57651381835f659c",
"type": "api-current-state",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "School Today?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.kallen_school_today",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "school_today",
"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": 700,
"y": 880,
"wires": [
[
"62211bf089bc5b04"
],
[]
]
},
{
"id": "acb52adc50d34045",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Lights On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [
"kallen_bedroom"
],
"deviceId": [],
"entityId": [],
"data": "{\t \"brightness_pct\": msg.adaptive.attributes.brightness_pct,\t \"transition\": msg.fade_night\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1120,
"y": 880,
"wires": [
[
"7b390a3b24fc3197"
]
]
},
{
"id": "e0751f3bf2a2e610",
"type": "ha-button",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Manual Bedtime",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "7cf78f522e860d42",
"outputProperties": [
{
"property": "toggle",
"propertyType": "msg",
"value": "on",
"valueType": "str"
},
{
"property": "topic",
"propertyType": "msg",
"value": "kallen-night",
"valueType": "str"
}
],
"x": 120,
"y": 760,
"wires": [
[
"d6b56cb65c2ff140"
]
]
},
{
"id": "1eb13d819ba7e226",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "iOS Notifications",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\":\"all\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"type\": \"normal\",\t \"tag\": \"master-bedroom-climate\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 2020,
"y": 320,
"wires": [
[]
]
},
{
"id": "d6b56cb65c2ff140",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Toggle Boolean",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_{{toggle}}",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.kallen_sleeping"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 700,
"y": 760,
"wires": [
[]
]
},
{
"id": "e32aaeb51d3f2e95",
"type": "server-state-changed",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Boolean State",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.kallen_sleeping",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": true,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "toggle",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "boolean",
"valueType": "str"
}
],
"x": 110,
"y": 940,
"wires": [
[
"61405a43f61f3d60"
]
]
},
{
"id": "90329b0683f81550",
"type": "api-render-template",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Random Line",
"server": "9e87348d.9c1c48",
"version": 0,
"template": "{{ [\n \"No fan in Collin's room tonight. Too cold outside. Brr. Enjoy your white noise.\",\n \"It is a little too cold for a fan tonight. I will play white noise for Collin\",\n \"Collin will not need any help staying cool tonight. I will play white noise instead.\",\n \"My sources are telling me that it is not fan weather tonight. White noise it is.\"\n] | random }} Goodnight!",
"resultsLocation": "payload",
"resultsLocationType": "msg",
"templateLocation": "",
"templateLocationType": "none",
"x": 810,
"y": 1140,
"wires": [
[
"b4dbbf788c5a30d2"
]
]
},
{
"id": "43ea4107912bf0f2",
"type": "api-render-template",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Random Line",
"server": "9e87348d.9c1c48",
"version": 0,
"template": "{{ [\n \"Collin's fan is now on. Stay cool!\",\n \"It is rather warm outside, so I am turning on Collin's fan.\",\n \"To prevent an ocean of sweat from drowning us all, I have enabled Collin's fan.\",\n \"My sensors indicate that for optimal comfort, a cooling device is needed for Collin tonight.\",\n \"I am a fan of Collin. So I have turned on a fan for Collin.\"\n] | random }} Goodnight!",
"resultsLocation": "payload",
"resultsLocationType": "msg",
"templateLocation": "",
"templateLocationType": "none",
"x": 810,
"y": 1200,
"wires": [
[
"b4dbbf788c5a30d2"
]
]
},
{
"id": "11993e61de14f592",
"type": "api-render-template",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Random Line",
"server": "9e87348d.9c1c48",
"version": 0,
"template": "{{ [\n \"Lights are now on in Collin's bedroom.\",\n \"Collin, your bedroom lights are now on.\"\n] | random }} Goodnight!",
"resultsLocation": "payload",
"resultsLocationType": "msg",
"templateLocation": "",
"templateLocationType": "none",
"x": 810,
"y": 1260,
"wires": [
[
"b4dbbf788c5a30d2"
]
]
},
{
"id": "308fce46bd959bce",
"type": "ha-time",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Kallen Fan Time",
"server": "9e87348d.9c1c48",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityId": "input_datetime.kallen_fan",
"property": "",
"offset": "0",
"offsetType": "num",
"offsetUnits": "minutes",
"randomOffset": false,
"repeatDaily": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "kallen-fan",
"valueType": "str"
}
],
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"debugenabled": false,
"x": 120,
"y": 1000,
"wires": [
[
"b371dfa2ee57b577"
]
]
},
{
"id": "4341325f7ca23f24",
"type": "api-current-state",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Scheduled Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "Fan",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_select.scheduled_climate_mode_kallen_fan",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "sched_mode",
"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": 695,
"y": 1020,
"wires": [
[
"1c98de289e42377f"
],
[]
],
"l": false
},
{
"id": "1c98de289e42377f",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Fan On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "fan",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"fan.kallen_bedroom_fan"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 830,
"y": 1020,
"wires": [
[]
]
},
{
"id": "a10629857d60f774",
"type": "function",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = global.get('mb_aircon_installed')\nvar topic = msg.topic\nvar vacation = states['input_boolean.vacation_mode'].state\nvar highTemp = states['sensor.todays_high_temp'].state\nvar dayThreshold = states['input_number.master_bedroom_daytime_threshold'].state\nvar dayTemp = states['input_number.master_bedroom_daytime_temp'].state\nvar nightTemp = states['input_number.master_bedroom_night_temp'].state\nvar bedTemp = states['input_number.master_bedroom_bedtime_temp'].state\nvar showerMode = states['input_boolean.shower_mode'].state\nvar nightVolume = states['input_number.master_bedroom_echo_dot_night_volume'].state\n\nmsg.acInstalled = ac\nmsg.daytemp = dayTemp\nmsg.nighttemp = nightTemp\nmsg.bedtemp = bedTemp\nmsg.daythreshold = dayThreshold\nmsg.showermode = showerMode\nmsg.nightvolume = nightVolume\n\nif (vacation === 'off') {\n if (topic === 'mrbedroom-cooling') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Cooling Schedule\"});\n return[msg,null,null]\n } else if (topic === 'manual-night') {\n node.status({fill:\"blue\",shape:\"dot\",text:\"Manual Night\"});\n return[msg,msg,null]\n } else if (topic === 'mrbedroom-fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Fan Schedule\"});\n return[null,msg,null]\n } else if (topic === 'mrbedroom-wakeup') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Wakeup Schedule\"});\n return[null,null,msg]\n } else if (topic === 'manual-day'){\n node.status({fill:\"blue\",shape:\"dot\",text:\"Manual Day\"});\n return[null,null,msg]\n }\n} else {\n return[null,null,null]\n}",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 610,
"y": 320,
"wires": [
[
"10d9b30654ef759c"
],
[
"6fb7131d5534350c"
],
[
"0a783dc1cb68b4bf"
]
],
"outputLabels": [
"Cooling",
"Fan",
"Wakeup"
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "e2ad91fc748ca519",
"type": "function",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Cooling Mode",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = global.get('mb_aircon_installed')\nvar showerMode = msg.showermode\nvar schedMode = states['input_select.scheduled_climate_mode_master_bedroom_aircon'].state\nvar hotDay = states['input_boolean.hot_day'].state\n\nmsg.schedmode = schedMode\n\nif (ac === 'on' && showerMode === 'off') {\n if (schedMode === 'AC') {\n if (hotDay === 'on') {\n msg.preset = 'none'\n } else {\n msg.preset = 'eco'\n }\n node.status({fill:\"green\",shape:\"dot\",text:\"AC\"});\n return[msg,null,null]\n } else if (schedMode === 'Fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Fan\"});\n return[null,msg,null]\n } else if (schedMode === 'N/A') {\n node.status({fill:\"blue\",shape:\"dot\",text:\"N/A\"});\n return[null,null,msg]\n }\n} else {\n if (ac === 'off') {\n node.status({fill:\"red\",shape:\"ring\",text:\"A/C Not Installed\"});\n } else if (showerMode === 'on') {\n node.status({fill:\"red\",shape:\"ring\",text:\"Shower Mode On\"});\n }\n return null\n}",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1020,
"y": 200,
"wires": [
[
"fd0a309681a536de"
],
[
"5008caa0192238f7",
"40dc1e930b887eb7"
],
[
"5008caa0192238f7"
]
],
"outputLabels": [
"AC",
"Fan",
"N/A"
],
"icon": "font-awesome/fa-snowflake-o"
},
{
"id": "a3ef2faca9922113",
"type": "function",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Bedtime Mode",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = global.get('mb_aircon_installed')\nvar schedMode = states['input_select.scheduled_climate_mode_master_bedroom_aircon'].state\nvar bedTemp = states['input_number.master_bedroom_bedtime_temp'].state\nvar topic = msg.topic\n\nmsg.bedtemp = bedTemp\n\nif (ac === 'on') {\n if (topic === 'mrbedroom-bedtime'){\n if (schedMode === 'AC') {\n node.status({fill:\"green\",shape:\"dot\",text:\"A/C\"});\n return[msg,null]\n } else {\n node.status({fill:\"grey\",shape:\"ring\",text:\"No A/C\"});\n return null\n }\n } else if (topic === 'manual-bedtime'){\n node.status({fill:\"blue\",shape:\"dot\",text:\"Manual Trigger\"});\n return[null,msg]\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"A/C Not Installed\"});\n return null\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 80,
"wires": [
[
"9179e99207e9f8f3"
],
[
"404c42d6fea46839"
]
],
"outputLabels": [
"Auto",
"Manual"
],
"icon": "font-awesome/fa-bed"
},
{
"id": "a8ef744455bb4c0a",
"type": "function",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Notifications",
"func": "var topic = msg.topic\nvar nightTemp = msg.nighttemp\n\nvar coolMsg = {\n \"payload\": 'Master bedroom AC temp has been set to ' + nightTemp + '°F as scheduled',\n \"topic\": 'AC Mode: Cooling'\n}\nvar fanOnlyMsg = {\n \"payload\": 'Too cold outside, AC running fan only.',\n \"topic\": \"AC Mode: Fan Only\"\n}\nvar fanSchedMsg = {\n \"payload\": 'Master bedroom fan has been activated as scheduled.',\n \"topic\": 'Fan Schedule Activated'\n}\n\nif (topic === 'mrbedroom-cooling') {\n var schedMode = msg.schedmode\n if (schedMode === 'AC') {\n node.status({fill:\"green\",shape:\"dot\",text:\"AC Cooling\"});\n return coolMsg;\n } else if (schedMode === 'Fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"AC Fan Only\"});\n return fanOnlyMsg;\n }\n} else if (topic === 'mrbedroom-fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Fan Schedule\"});\n return fanSchedMsg;\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Manual Trigger Blocked\"});\n return null\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1830,
"y": 320,
"wires": [
[
"1eb13d819ba7e226"
]
]
},
{
"id": "6ed7feb3956038ed",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Eco Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_preset_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"preset_mode\":\"none\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 880,
"y": 60,
"wires": [
[
"67509a5554fc091f"
]
]
},
{
"id": "4a1db30e164dadc8",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Eco On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_preset_mode",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"preset_mode\":\"eco\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1660,
"y": 500,
"wires": [
[
"b14bcbf98b7e9f91"
]
]
},
{
"id": "9c01880c6319d29b",
"type": "function",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Shower Mode",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = states['input_boolean.master_bedroom_aircon_installed'].state\nvar temp = states['sensor.pirateweather_temperature'].state\nvar threshold = states['input_number.master_bedroom_aircon_run_threshold'].state\nvar nightTemp = states['input_number.master_bedroom_night_temp'].state\nvar goodnight = states['input_boolean.goodnight'].state\nvar coolState = states['input_boolean.master_bedroom_cooling_on'].state\nvar showerMode = msg.payload\n\nmsg.temp = temp\nmsg.nighttemp = nightTemp\nmsg.threshold = threshold\n\nif (ac === 'on') {\n if (showerMode === 'on') {\n if (temp >= threshold) {\n node.status({ fill: \"green\", shape: \"dot\", text: \"Shower Mode On\" });\n return [msg, null, null, null]\n } else {\n node.status({ fill: \"red\", shape: \"ring\", text: \"Too Cold\" });\n return null\n }\n } else if (showerMode === 'off') {\n if (coolState === 'on') {\n if (goodnight === 'on') {\n node.status({ fill: \"green\", shape: \"dot\", text: \"Bedtime Mode\" });\n return [null, msg, null, null]\n } else if (goodnight === 'off') {\n node.status({ fill: \"green\", shape: \"dot\", text: \"Night Mode\" });\n return [null, null, msg, null]\n }\n } else {\n node.status({ fill: \"green\", shape: \"dot\", text: \"Day Mode\" });\n return [null, null, null, msg]\n }\n }\n} else {\n node.status({ fill: \"red\", shape: \"ring\", text: \"A/C Not Installed\" });\n return null\n}\n\n",
"outputs": 4,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 300,
"y": 540,
"wires": [
[
"f541ad53e32f703b"
],
[
"96f6dcaa16f8ee6f"
],
[
"11ed2afea8133e8f"
],
[
"be70ec3d9b852b89"
]
],
"outputLabels": [
"On",
"Off - Bedtime",
"Off - Night",
"Off - Day"
],
"icon": "node-red/switch.svg"
},
{
"id": "96f6dcaa16f8ee6f",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set bedtime mode",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "button",
"service": "press",
"areaId": [],
"deviceId": [],
"entityId": [
"button.master_bedroom_bedtime_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 510,
"y": 540,
"wires": [
[]
]
},
{
"id": "61405a43f61f3d60",
"type": "function",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar vacationMode = states['input_boolean.vacation_mode'].state\nvar overnight = states['input_boolean.kallen_overnight'].state\nvar kallenLoc = states['person.kallen_stork'].state\nvar nightVolume = states['input_number.kallen_bedroom_google_speaker_night_volume'].state\nvar brightness = states['switch.adaptive_lighting_kallen_bedroom'].attributes.brightness_pct\nvar fadeDay = states['input_number.wakeup_lights_fade_day'].state\nvar fadeNight = states['input_number.wakeup_lights_fade_night'].state\nvar topic = msg.topic\nvar toggle = msg.toggle\n\nif (vacationMode === 'off' && overnight === 'off' && kallenLoc === 'home') {\n if (topic === 'kallen-fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Fan\"});\n return[null,null,null,msg]\n } else if (toggle === 'off') {\n msg.brightness = brightness\n msg.fade_day = fadeDay * 60\n msg.fade_night = fadeNight * 60\n node.status({fill:\"green\",shape:\"dot\",text:\"Wakeup\"});\n return[null,msg,null,null]\n } else if (toggle === 'on') {\n msg.volume = nightVolume\n node.status({fill:\"green\",shape:\"dot\",text:\"Sleep\"});\n return[null,null,msg,null]\n }\n} else {\n if (topic === 'boolean') {\n msg.toggle = 'off'\n node.status({fill:\"red\",shape:\"ring\",text:\"Blocked\"});\n return [msg,null,null,null]\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Blocked\"});\n return null\n }\n}",
"outputs": 4,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 940,
"wires": [
[
"d6b56cb65c2ff140"
],
[
"57651381835f659c",
"d132875202e85038"
],
[
"274d63b8df8f2dd0"
],
[
"4341325f7ca23f24"
]
],
"outputLabels": [
"blocked",
"wake",
"sleep",
"fan"
]
},
{
"id": "af209a80e9174433",
"type": "function",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Scheduled Mode",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar schedMode = states['input_select.scheduled_climate_mode_kallen_fan'].state\n\nmsg.topic = 'common'\nmsg.voice = 'Joanna'\n\nif (schedMode === 'White Noise') {\n node.status({fill:\"green\",shape:\"dot\",text:\"White Noise\"});\n return[msg,null,null]\n} else if (schedMode === 'Fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Fan\"});\n return[null,msg,null]\n} else {\n node.status({fill:\"blue\",shape:\"dot\",text:\"N/A\"});\n return[null,null,msg]\n}\n",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 1200,
"wires": [
[
"2f3666d288d77ad1",
"99e74844b8fd9d1a",
"90329b0683f81550"
],
[
"2f3666d288d77ad1",
"265b54394cc42f53"
],
[
"2f3666d288d77ad1",
"11993e61de14f592"
]
],
"outputLabels": [
"White Noise",
"Fan",
"N/A"
]
},
{
"id": "274d63b8df8f2dd0",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Set Volume",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "volume_set",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.kallen_bedroom_speaker"
],
"data": "{\t \"volume_level\": msg.volume\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 210,
"y": 1200,
"wires": [
[
"af209a80e9174433"
]
]
},
{
"id": "62211bf089bc5b04",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Adaptive Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_kallen_bedroom"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 890,
"y": 880,
"wires": [
[
"d0dacbae4513b1ad"
]
]
},
{
"id": "d0dacbae4513b1ad",
"type": "delay",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"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": 1015,
"y": 880,
"wires": [
[
"acb52adc50d34045"
]
],
"l": false
},
{
"id": "7b390a3b24fc3197",
"type": "delay",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1225,
"y": 880,
"wires": [
[
"a417e93366843249"
]
],
"l": false
},
{
"id": "a417e93366843249",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Adaptive On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_bedroom_scenes"
],
"data": "{\t \"option\":\"Adaptive\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1350,
"y": 880,
"wires": [
[]
]
},
{
"id": "1967e5238d3aa5a1",
"type": "api-call-service",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Set Temp",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "set_temperature",
"areaId": [],
"deviceId": [],
"entityId": [
"climate.master_bedroom_aircon"
],
"data": "{\t \"temperature\": msg.nighttemp\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1500,
"y": 520,
"wires": [
[
"4a1db30e164dadc8"
]
]
},
{
"id": "b371dfa2ee57b577",
"type": "api-current-state",
"z": "72f99805df043603",
"g": "39a7ac02f2727f1d",
"name": "Needed?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.kallen_fan_separate_schedule",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "needed",
"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": 255,
"y": 1000,
"wires": [
[
"61405a43f61f3d60"
],
[]
],
"outputLabels": [
"On",
"Off"
],
"l": false
},
{
"id": "f8cc9d6657bff329",
"type": "function",
"z": "72f99805df043603",
"g": "e065b1ed4938b477",
"name": "Hot Day?",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = global.get('mb_aircon_installed')\nvar highTemp = states['sensor.todays_high_temp'].state\nvar dayThreshold = states['input_number.master_bedroom_daytime_threshold'].state\nvar dayTemp = states['input_number.master_bedroom_daytime_temp'].state\nvar nightTemp = states['input_number.master_bedroom_night_temp'].state\n\nmsg.daytemp = dayTemp\nmsg.nighttemp = nightTemp\n\nif (ac === 'on') {\n if (highTemp > dayThreshold) {\n node.status({fill:\"green\",shape:\"dot\",text:\"Hot Day\"});\n return[msg,null,msg]\n } else {\n node.status({fill:\"green\",shape:\"dot\",text:\"Normal\"});\n return[null,msg,msg]\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"No A/C\"});\n return[null,null,msg]\n}",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1100,
"y": 420,
"wires": [
[
"24c3166123d5dad0"
],
[
"1967e5238d3aa5a1"
],
[
"e473da127624f191"
]
],
"outputLabels": [
"Hot Day",
"Normal",
"No A/C"
],
"icon": "font-awesome/fa-thermometer"
},
{
"id": "105271e0816c6a52",
"type": "ha-button",
"z": "5c4ac37140a54ac9",
"name": "Good Morning",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "ad5b1d9f1ea8fea1",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
},
{
"property": "topic",
"propertyType": "msg",
"value": "mrbedroom-wakeup",
"valueType": "str"
}
],
"x": 110,
"y": 60,
"wires": [
[
"c18d27a9438bfa08",
"ef0efdc23805d872",
"bad6373b442c58a1"
]
]
},
{
"id": "c01d647c6091a47b",
"type": "file in",
"z": "5c4ac37140a54ac9",
"d": true,
"g": "b708cb6d93f40dee",
"name": "Read File",
"filename": "/config/files/weather_briefing_full.txt",
"filenameType": "str",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 1180,
"y": 700,
"wires": [
[
"e59180a1a6ae0a90"
]
]
},
{
"id": "b83b6e027c21a133",
"type": "alexa-remote-routine",
"z": "5c4ac37140a54ac9",
"d": true,
"g": "b708cb6d93f40dee",
"name": "",
"account": "be975ce229701797",
"routineNode": {
"type": "node",
"payload": {
"type": "serial",
"children": [
{
"type": "wait",
"payload": {
"time": {
"type": "num",
"value": "1"
}
}
},
{
"type": "prompt",
"payload": {
"type": {
"type": "str",
"value": "goodMorning"
},
"devices": {
"type": "msg",
"value": "where"
}
}
},
{
"type": "speak",
"payload": {
"type": "regular",
"text": {
"type": "msg",
"value": "payload"
},
"devices": {
"type": "msg",
"value": "where"
}
}
},
{
"type": "prompt",
"payload": {
"type": {
"type": "str",
"value": "traffic"
},
"devices": {
"type": "msg",
"value": "where"
}
}
},
{
"type": "prompt",
"payload": {
"type": {
"type": "str",
"value": "calendarToday"
},
"devices": {
"type": "msg",
"value": "where"
}
}
},
{
"type": "prompt",
"payload": {
"type": {
"type": "str",
"value": "calendarTomorrow"
},
"devices": {
"type": "msg",
"value": "where"
}
}
}
]
}
},
"x": 1620,
"y": 700,
"wires": [
[]
]
},
{
"id": "2854170262757e84",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Turn off switches",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.basement_echo_dot_do_not_disturb_switch",
"switch.living_room_echo_dot_do_not_disturb_switch",
"switch.master_bedroom_echo_dot_do_not_disturb_switch"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 510,
"y": 60,
"wires": [
[
"5c9c73b7adb72896",
"2fb85204eb56f86b"
]
]
},
{
"id": "6f84caa4bd59a747",
"type": "ha-button",
"z": "5c4ac37140a54ac9",
"name": "Weather Briefing",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "a8da4d03a2922c42",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 120,
"y": 740,
"wires": [
[
"fa09d8a69bcbfbb5"
]
]
},
{
"id": "ba97906b7b81342c",
"type": "ha-button",
"z": "5c4ac37140a54ac9",
"name": "Goodnight",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "30f1658baee9378e",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
},
{
"property": "topic",
"propertyType": "msg",
"value": "mrbedroom-bedtime",
"valueType": "str"
}
],
"x": 100,
"y": 300,
"wires": [
[
"f30486c8e11db0e4",
"582a6e14b94a5a6d",
"028351e8c4e2faf5",
"f935318d262547d5",
"60ce44747cf3e507",
"50e351d1ee6108b3",
"33773b3aaa551b79"
]
]
},
{
"id": "f30486c8e11db0e4",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Sleep Mode",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.basement_echo_dot_do_not_disturb_switch",
"switch.living_room_echo_dot_do_not_disturb_switch",
"switch.master_bedroom_echo_dot_do_not_disturb_switch"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 310,
"y": 300,
"wires": [
[
"2916b53a91f17ca1"
]
]
},
{
"id": "f84c9f54acbdafd0",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Lights Out",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [
"basement_studio",
"dining_room",
"downstairs_bathroom",
"furnace_room",
"kallen_bedroom",
"living_room",
"master_bedroom",
"mud_room",
"emma_bedroom",
"upstairs_hallway"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 690,
"y": 340,
"wires": [
[
"9cbe2333acb0e1f5"
]
]
},
{
"id": "d9e39b8ebb86c941",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Kallen Desktop - Shutdown",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "kallen_desktop_shutdown",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 640,
"y": 500,
"wires": [
[]
]
},
{
"id": "e59180a1a6ae0a90",
"type": "subflow:a42343e035e3313c",
"z": "5c4ac37140a54ac9",
"d": true,
"g": "b708cb6d93f40dee",
"name": "",
"x": 1390,
"y": 700,
"wires": [
[
"b83b6e027c21a133"
]
]
},
{
"id": "582a6e14b94a5a6d",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Basement Fan Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "fan",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"fan.basement_fan"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 330,
"y": 440,
"wires": [
[]
]
},
{
"id": "a58bc61a625f47af",
"type": "ha-button",
"z": "5c4ac37140a54ac9",
"name": "Daily Briefing",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "998d8d67ec377dd3",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 110,
"y": 800,
"wires": [
[
"1d121bd0f1f5d628"
]
]
},
{
"id": "5eb7493d13b65a60",
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 800,
"wires": []
},
{
"id": "804c40c435c342fc",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Script",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "daily_briefing",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": msg.who\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 350,
"y": 800,
"wires": [
[
"5eb7493d13b65a60"
]
]
},
{
"id": "09c7a61f7a4c4d05",
"type": "api-current-state",
"z": "5c4ac37140a54ac9",
"name": "Check Security",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "disarmed",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "alarm_control_panel.stratton_ave_alarm",
"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": 1260,
"y": 300,
"wires": [
[
"280e2a7895ca63fb"
],
[]
]
},
{
"id": "280e2a7895ca63fb",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Arm Security",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "security_arm_home",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1450,
"y": 300,
"wires": [
[]
]
},
{
"id": "28a99bbb21540cbc",
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 510,
"y": 740,
"wires": []
},
{
"id": "3363b9392f425a55",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Script",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "weather_briefing",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": msg.who\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 370,
"y": 740,
"wires": [
[
"28a99bbb21540cbc"
]
]
},
{
"id": "fa09d8a69bcbfbb5",
"type": "subflow:05a2d9f89e72481f",
"z": "5c4ac37140a54ac9",
"name": "",
"x": 255,
"y": 740,
"wires": [
[
"3363b9392f425a55"
]
],
"l": false
},
{
"id": "1d121bd0f1f5d628",
"type": "subflow:05a2d9f89e72481f",
"z": "5c4ac37140a54ac9",
"name": "",
"x": 235,
"y": 800,
"wires": [
[
"804c40c435c342fc"
]
],
"l": false
},
{
"id": "5c9c73b7adb72896",
"type": "link out",
"z": "5c4ac37140a54ac9",
"name": "Good Morning Output",
"mode": "link",
"links": [
"dc440dfc78c41b8a"
],
"x": 675,
"y": 60,
"wires": []
},
{
"id": "028351e8c4e2faf5",
"type": "link out",
"z": "5c4ac37140a54ac9",
"name": "Goodnight Output - Climate",
"mode": "link",
"links": [
"bc592ba259667f9d"
],
"x": 255,
"y": 360,
"wires": []
},
{
"id": "fcd7dc43a7618a0a",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Bathroom Nightlight",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.upstairs_bathroom_scenes"
],
"data": "{\t \"option\":\"Single Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 610,
"y": 640,
"wires": [
[]
]
},
{
"id": "f935318d262547d5",
"type": "api-current-state",
"z": "5c4ac37140a54ac9",
"name": "Kallen Overnight?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.kallen_overnight",
"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": 330,
"y": 620,
"wires": [
[
"26454728352212e8"
],
[
"fcd7dc43a7618a0a"
]
],
"outputLabels": [
"On",
"Off"
]
},
{
"id": "26454728352212e8",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Bathroom Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.upstairs_bathroom_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 590,
"y": 580,
"wires": [
[]
]
},
{
"id": "60ce44747cf3e507",
"type": "link out",
"z": "5c4ac37140a54ac9",
"name": "Goodnight Output - Lighting",
"mode": "link",
"links": [
"55e84ccb73ae9b74"
],
"x": 255,
"y": 400,
"wires": []
},
{
"id": "fe338e85c7419657",
"type": "ha-button",
"z": "5c4ac37140a54ac9",
"name": "Kallen School Status",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "d9da4bd707013bc5",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 130,
"y": 860,
"wires": [
[
"ed96b2ce33128205"
]
]
},
{
"id": "ed96b2ce33128205",
"type": "subflow:05a2d9f89e72481f",
"z": "5c4ac37140a54ac9",
"name": "",
"x": 275,
"y": 860,
"wires": [
[
"08eafe762d6146ee"
]
],
"l": false
},
{
"id": "08eafe762d6146ee",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Script",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "kallen_school_status",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": msg.who\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 390,
"y": 860,
"wires": [
[
"e39da18ec3ecc852"
]
]
},
{
"id": "e39da18ec3ecc852",
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 530,
"y": 860,
"wires": []
},
{
"id": "2916b53a91f17ca1",
"type": "api-current-state",
"z": "5c4ac37140a54ac9",
"name": "Guest Mode?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.guest_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "guest",
"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": 500,
"y": 300,
"wires": [
[
"8a473793e8acc9db"
],
[
"f84c9f54acbdafd0"
]
]
},
{
"id": "8a473793e8acc9db",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Lights Out",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [
"basement_studio",
"dining_room",
"downstairs_bathroom",
"emma_bedroom",
"furnace_room",
"kallen_bedroom",
"living_room",
"master_bedroom"
],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 689,
"y": 277,
"wires": [
[
"2dba21a1c020e079"
]
]
},
{
"id": "2dba21a1c020e079",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Nightlights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.mud_room_scenes",
"input_select.upstairs_hallway_scenes"
],
"data": "{\t \"option\":\"Nightlight\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 870,
"y": 280,
"wires": [
[
"9cbe2333acb0e1f5"
]
]
},
{
"id": "9cbe2333acb0e1f5",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Desk Lights Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.tina_desk_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1060,
"y": 300,
"wires": [
[
"09c7a61f7a4c4d05"
]
]
},
{
"id": "c18d27a9438bfa08",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Morning Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "morning_scene",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 320,
"y": 60,
"wires": [
[
"2854170262757e84"
]
]
},
{
"id": "ef0efdc23805d872",
"type": "api-current-state",
"z": "5c4ac37140a54ac9",
"name": "Morning?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.morning",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "time",
"propertyType": "msg",
"value": "morning",
"valueType": "str"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 300,
"y": 120,
"wires": [
[
"54b8bca62d27e659"
],
[]
],
"outputLabels": [
"on",
"off"
]
},
{
"id": "bad6373b442c58a1",
"type": "api-current-state",
"z": "5c4ac37140a54ac9",
"name": "Late Morning?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.late_morning",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "time",
"propertyType": "msg",
"value": "late-morning",
"valueType": "str"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 320,
"y": 180,
"wires": [
[
"54b8bca62d27e659"
],
[]
],
"outputLabels": [
"on",
"off"
]
},
{
"id": "54b8bca62d27e659",
"type": "api-current-state",
"z": "5c4ac37140a54ac9",
"name": "Security State",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "armed_home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "alarm_control_panel.stratton_ave_alarm",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "security",
"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": 540,
"y": 180,
"wires": [
[
"708843ea29ee6626"
],
[]
],
"outputLabels": [
"armed_home",
"else"
]
},
{
"id": "708843ea29ee6626",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Disarm Security",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "security_disarm",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"silent\": 1\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 740,
"y": 180,
"wires": [
[
"bb77b36dd4d9cc96"
]
]
},
{
"id": "bb77b36dd4d9cc96",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Disable Automations",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "automation",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"automation.scheduled_alarm_disarm",
"automation.scheduled_alarm_rearm"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 960,
"y": 180,
"wires": [
[]
]
},
{
"id": "50e351d1ee6108b3",
"type": "api-current-state",
"z": "5c4ac37140a54ac9",
"name": "Kallen Computer Updates?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.kallen_computer_updates",
"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": 360,
"y": 500,
"wires": [
[
"d9e39b8ebb86c941"
],
[]
],
"outputLabels": [
"Off",
"On"
]
},
{
"id": "33773b3aaa551b79",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Goodnight Switch",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.goodnight",
"input_boolean.master_bedroom_sleeping",
"input_boolean.night_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 330,
"y": 560,
"wires": [
[]
]
},
{
"id": "2fb85204eb56f86b",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "TTS Briefing",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "morning_briefing",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\":\"alexa_everywhere\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 730,
"y": 120,
"wires": [
[]
]
},
{
"id": "8c4d01db6f6ef33e",
"type": "ha-button",
"z": "5c4ac37140a54ac9",
"name": "Kallen Activities",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "503ba5fd53d97d51",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 120,
"y": 940,
"wires": [
[
"88c56b0964f9a6db"
]
]
},
{
"id": "20ede2b52515bc63",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Ask Activity",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "activate_alexa_actionable_notification",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"text\":\"<voice name='Joanna'>What activity are we timing?</voice>\",\t \"event_id\":\"actionable_notification_kallen_timer_activity\",\t \"alexa_device\": msg.who\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 930,
"y": 940,
"wires": [
[
"38e168a79848fa19"
]
]
},
{
"id": "88c56b0964f9a6db",
"type": "subflow:b88bb63bb13eeb27",
"z": "5c4ac37140a54ac9",
"name": "",
"x": 275,
"y": 940,
"wires": [
[
"7d53b4bd4c7ea874"
]
],
"l": false
},
{
"id": "38e168a79848fa19",
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "Activity",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1100,
"y": 940,
"wires": []
},
{
"id": "86cd67e28114a585",
"type": "server-events",
"z": "5c4ac37140a54ac9",
"name": "Activity Response",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "alexa_actionable_notification",
"exposeToHomeAssistant": false,
"eventData": "{\"event_id\":\"actionable_notification_kallen_timer_activity\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$outputData(\"eventData\").event_type",
"valueType": "jsonata"
}
],
"event_type": "",
"x": 130,
"y": 1000,
"wires": [
[
"5926b0004a47dfd1"
]
]
},
{
"id": "5926b0004a47dfd1",
"type": "subflow:b88bb63bb13eeb27",
"z": "5c4ac37140a54ac9",
"name": "",
"x": 275,
"y": 1000,
"wires": [
[
"4726a2605a1f56cc"
]
],
"l": false
},
{
"id": "50982205a91e63c5",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Ask Duration",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "activate_alexa_actionable_notification",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"text\":\"<voice name='Joanna'>How long would you like the timer set for?</voice>\",\t \"event_id\":\"actionable_notification_kallen_timer_duration\",\t \"alexa_device\": msg.who\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 930,
"y": 1000,
"wires": [
[
"254ffc8e8bd1d414"
]
]
},
{
"id": "254ffc8e8bd1d414",
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "Duration",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1100,
"y": 1000,
"wires": []
},
{
"id": "c43b69d84deb44a4",
"type": "server-events",
"z": "5c4ac37140a54ac9",
"name": "Duration Response",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "alexa_actionable_notification",
"exposeToHomeAssistant": false,
"eventData": "{\"event_id\":\"actionable_notification_kallen_timer_duration\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$outputData(\"eventData\").event_type",
"valueType": "jsonata"
}
],
"event_type": "",
"x": 130,
"y": 1060,
"wires": [
[
"6167d4da61990bfb"
]
]
},
{
"id": "65589264d77f668d",
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "Location",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1100,
"y": 1060,
"wires": []
},
{
"id": "6167d4da61990bfb",
"type": "subflow:b88bb63bb13eeb27",
"z": "5c4ac37140a54ac9",
"name": "",
"x": 275,
"y": 1060,
"wires": [
[
"506e7e645cf06383"
]
],
"l": false
},
{
"id": "2aa8397f85a8ceed",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Set Activity",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_activities"
],
"data": "{\t \"option\": msg.payload.event.event_response\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 690,
"y": 1000,
"wires": [
[
"50982205a91e63c5"
]
]
},
{
"id": "9f1c60a822a2b550",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Set Duration",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_number",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_number.kallen_activity_duration"
],
"data": "{\t \"value\": msg.duration\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 690,
"y": 1060,
"wires": [
[
"dff1ff1e18a1bc74"
]
]
},
{
"id": "dff1ff1e18a1bc74",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Ask Location",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "activate_alexa_actionable_notification",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"text\":\"<voice name='Joanna'>Which room would you like the timer to run in?</voice>\",\t \"event_id\":\"actionable_notification_kallen_timer_location\",\t \"alexa_device\": msg.who\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 930,
"y": 1060,
"wires": [
[
"65589264d77f668d"
]
]
},
{
"id": "9e3c9006ff125d9b",
"type": "server-events",
"z": "5c4ac37140a54ac9",
"name": "Location Response",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "alexa_actionable_notification",
"exposeToHomeAssistant": false,
"eventData": "{\"event_id\":\"actionable_notification_kallen_timer_location\"}",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$outputData(\"eventData\").event_type",
"valueType": "jsonata"
}
],
"event_type": "",
"x": 130,
"y": 1120,
"wires": [
[
"716d4f60c2af0f2e"
]
]
},
{
"id": "efd47cbc26ed2810",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Set Location",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.kallen_activity_room"
],
"data": "{\t \"option\": msg.payload.event.event_response\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 690,
"y": 1120,
"wires": [
[
"c2212b77414c61f3"
]
]
},
{
"id": "75e1b9f265ecb4e5",
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "End",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1090,
"y": 1120,
"wires": []
},
{
"id": "c2212b77414c61f3",
"type": "delay",
"z": "5c4ac37140a54ac9",
"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": 805,
"y": 1120,
"wires": [
[
"1383f8e6ebf8ad88"
]
],
"l": false
},
{
"id": "1383f8e6ebf8ad88",
"type": "api-call-service",
"z": "5c4ac37140a54ac9",
"name": "Start Timer",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "button",
"service": "press",
"areaId": [],
"deviceId": [],
"entityId": [
"button.kallen_timer_start"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 930,
"y": 1120,
"wires": [
[
"75e1b9f265ecb4e5"
]
]
},
{
"id": "7d53b4bd4c7ea874",
"type": "function",
"z": "5c4ac37140a54ac9",
"name": "Filtering",
"func": "var who = msg.who\n\nif (who === 'media_player.master_bedroom_echo_dot') {\n msg.who = 'media_player.living_room_echo_dot'\n node.status({ fill: \"red\", shape: \"dot\", text: \"Rerouted\" });\n return msg;\n} else {\n msg.who = who\n node.status({ fill: \"green\", shape: \"dot\", text: \"Unchanged\" });\n return msg;\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 520,
"y": 940,
"wires": [
[
"20ede2b52515bc63"
]
]
},
{
"id": "4726a2605a1f56cc",
"type": "function",
"z": "5c4ac37140a54ac9",
"name": "Filtering",
"func": "var who = msg.who\nvar responseType = msg.payload.event.event_response_type\n\nif (responseType != 'ResponseNone') {\n if (who === 'media_player.master_bedroom_echo_dot') {\n msg.who = 'media_player.living_room_echo_dot'\n node.status({fill:\"red\",shape:\"dot\",text:\"Rerouted\"});\n return msg;\n } else {\n msg.who = who\n node.status({fill:\"green\",shape:\"dot\",text:\"Unchanged\"});\n return msg;\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"No Response\"});\n return null\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 520,
"y": 1000,
"wires": [
[
"2aa8397f85a8ceed"
]
]
},
{
"id": "506e7e645cf06383",
"type": "function",
"z": "5c4ac37140a54ac9",
"name": "Filtering",
"func": "var who = msg.who\nvar responseType = msg.payload.event.event_response_type\n\nmsg.duration = (msg.payload.event.event_response / 60)\n\nif (responseType != 'ResponseNone') {\n if (who === 'media_player.master_bedroom_echo_dot') {\n msg.who = 'media_player.living_room_echo_dot'\n node.status({ fill: \"red\", shape: \"dot\", text: \"Rerouted, \" + msg.duration + \"m\" });\n return msg;\n } else {\n msg.who = who\n node.status({ fill: \"green\", shape: \"dot\", text: \"Unchanged, \" + msg.duration + \"m\" });\n return msg;\n }\n} else {\n node.status({ fill: \"red\", shape: \"ring\", text: \"No Response\" });\n return null\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 520,
"y": 1060,
"wires": [
[
"9f1c60a822a2b550"
]
]
},
{
"id": "716d4f60c2af0f2e",
"type": "function",
"z": "5c4ac37140a54ac9",
"name": "Filtering",
"func": "var responseType = msg.payload.event.event_response_type\n\nif (responseType === 'ResponseNone') {\n node.status({fill:\"red\",shape:\"ring\",text:\"No Response\"});\n return null\n} else {\n node.status({fill:\"green\",shape:\"dot\",text:\"Success\"});\n return msg;\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 520,
"y": 1120,
"wires": [
[
"efd47cbc26ed2810"
]
]
},
{
"id": "6a37c598ccfec0c7",
"type": "google-home",
"z": "75e98103856848a6",
"conf": "457914a2c9dc72c1",
"device": "20328",
"acknowledge": true,
"name": "",
"topic": "tester of testiness",
"x": 250,
"y": 240,
"wires": [
[
"ef99a4a89289098c"
]
]
},
{
"id": "ef99a4a89289098c",
"type": "debug",
"z": "75e98103856848a6",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 470,
"y": 240,
"wires": []
},
{
"id": "07a2f8b7e49040f8",
"type": "file in",
"z": "75e98103856848a6",
"name": "Read File",
"filename": "/config/files/weather_briefing_full.txt",
"filenameType": "str",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 480,
"y": 340,
"wires": [
[
"0249c367ffa0a6a1"
]
]
},
{
"id": "d8d284802d3ba380",
"type": "ha-button",
"z": "75e98103856848a6",
"name": "Weather Briefing Google",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "8860321096392e94",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
},
{
"property": "topic",
"propertyType": "msg",
"value": "Kallen Bedroom",
"valueType": "str"
}
],
"x": 270,
"y": 340,
"wires": [
[
"07a2f8b7e49040f8"
]
]
},
{
"id": "0249c367ffa0a6a1",
"type": "subflow:6429099c4571dd6b",
"z": "75e98103856848a6",
"name": "",
"x": 660,
"y": 340,
"wires": [
[]
]
},
{
"id": "223a7234238933a7",
"type": "ha-button",
"z": "75e98103856848a6",
"name": "Daily Briefing Google",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "9c84afc610ced7b6",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
},
{
"property": "topic",
"propertyType": "msg",
"value": "Kallen Bedroom",
"valueType": "str"
}
],
"x": 260,
"y": 400,
"wires": [
[
"96905a317852d84e"
]
]
},
{
"id": "6059344e8c26ac8c",
"type": "ha-button",
"z": "75e98103856848a6",
"name": "Kallen School Status Google",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "2c222901ee192ba1",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
},
{
"property": "who",
"propertyType": "msg",
"value": "kallen_bedroom",
"valueType": "str"
}
],
"x": 280,
"y": 460,
"wires": [
[
"062135211ea05aee"
]
]
},
{
"id": "062135211ea05aee",
"type": "api-call-service",
"z": "75e98103856848a6",
"name": "Script",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "kallen_school_status",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": msg.who\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 490,
"y": 460,
"wires": [
[]
]
},
{
"id": "dc94d479f37be046",
"type": "api-call-service",
"z": "75e98103856848a6",
"name": "Speech Engine",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "speech_engine",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\":\"kallen_bedroom\",\t \"message\": msg.payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1200,
"y": 400,
"wires": [
[]
]
},
{
"id": "96905a317852d84e",
"type": "file in",
"z": "75e98103856848a6",
"name": "Read File",
"filename": "/config/templates/speech/daily_briefing.yaml",
"filenameType": "str",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 460,
"y": 400,
"wires": [
[
"293cc3018a39af5d"
]
]
},
{
"id": "293cc3018a39af5d",
"type": "change",
"z": "75e98103856848a6",
"name": "",
"rules": [
{
"t": "set",
"p": "template",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 400,
"wires": [
[
"0b5a8b6754e8ab37"
]
]
},
{
"id": "0b5a8b6754e8ab37",
"type": "api-render-template",
"z": "75e98103856848a6",
"name": "",
"server": "9e87348d.9c1c48",
"version": 0,
"template": "",
"resultsLocation": "payload",
"resultsLocationType": "msg",
"templateLocation": "template",
"templateLocationType": "msg",
"x": 840,
"y": 400,
"wires": [
[
"c1e3cffdafae7507"
]
]
},
{
"id": "c1e3cffdafae7507",
"type": "function",
"z": "75e98103856848a6",
"name": "Formatting",
"func": "var str = msg.payload\nstr = str.replaceAll(\"<p>\", \" \")\nstr = str.replaceAll(\"</p>\", \" \")\nstr = str.replaceAll(\">\", \" \")\nstr = str.replaceAll(\"<s>\", \" \")\nstr = str.replaceAll(\"</s>\", \" \")\nstr = str.replaceAll(\"<s\", \" \")\nstr = str.replaceAll(\"</s\", \" \")\n\nmsg.payload = str\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1010,
"y": 400,
"wires": [
[
"dc94d479f37be046"
]
]
},
{
"id": "11f5f6e0f1e4da25",
"type": "server-state-changed",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Package Delivered",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.mail_amazon_packages_delivered",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "0",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"outputs": 2,
"output_only_on_state_change": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": true,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "A package has been delivered by Amazon! I repeat, a package has been delivered by Amazon!",
"valueType": "str"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "common",
"valueType": "str"
}
],
"x": 170,
"y": 180,
"wires": [
[
"15fde8d3275b8455"
],
[]
]
},
{
"id": "3250ca66d8342dd8",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Save Light State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "create",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"scene_id\":\"amazon_package_delivered_restore\",\t \"snapshot_entities\":[\"light.basement_led_strip_1\",\"light.basement_tall_lamp\",\"light.basement_short_lamp\",\"light.basement_stairwell\",\"light.living_room_color_1\",\"light.living_room_color_2\",\"light.living_room_color_3\",\"light.tina_lamp_top\",\"light.tina_lamp_side\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 800,
"y": 140,
"wires": [
[
"02cd94391e205cd9"
]
]
},
{
"id": "6091f5e58812f97f",
"type": "api-current-state",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"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": "studio-quiet",
"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": 600,
"y": 180,
"wires": [
[
"3250ca66d8342dd8"
],
[
"32816b7834e1b318"
]
],
"outputLabels": [
"off",
"on"
]
},
{
"id": "32816b7834e1b318",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Save Light State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "create",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"scene_id\":\"amazon_package_delivered_restore\",\t \"snapshot_entities\":[\"light.living_room_color_1\",\"light.living_room_color_2\",\"light.living_room_color_3\",\"light.tina_lamp_top\",\"light.tina_lamp_side\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 800,
"y": 320,
"wires": [
[
"059eaa30829a743e"
]
]
},
{
"id": "02cd94391e205cd9",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Save Adaptive State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "create",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"scene_id\":\"amazon_package_delivered_adaptive_restore\",\t \"snapshot_entities\":[\"switch.adaptive_lighting_basement_studio\",\"switch.adaptive_lighting_living_room\",\"switch.adaptive_lighting_tina_lamp\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1020,
"y": 140,
"wires": [
[
"1504548e7ebc3844",
"a71c61b06a3e7b0d",
"458ddfa9d748f88f"
]
]
},
{
"id": "059eaa30829a743e",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Save Adaptive State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "create",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"scene_id\":\"amazon_package_delivered_adaptive_restore\",\t \"snapshot_entities\":[\"switch.adaptive_lighting_living_room\",\"switch.adaptive_lighting_tina_lamp\"]\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1020,
"y": 320,
"wires": [
[
"d336afe957a65e33",
"37bdac2c9a4e2837"
]
]
},
{
"id": "a71c61b06a3e7b0d",
"type": "lifx-pulse-effect",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "",
"api": "60eb53fb94cd64e4",
"selector": "group:Basement Studio",
"color": "blue",
"from_color": "",
"period": "0.5",
"cycles": "30",
"persist": "false",
"power_on": "true",
"x": 1250,
"y": 140,
"wires": []
},
{
"id": "1504548e7ebc3844",
"type": "delay",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1195,
"y": 80,
"wires": [
[
"ddbbde89f52be826"
]
],
"l": false
},
{
"id": "d8b6743cb853018d",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Hue Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.basement_short_lamp",
"light.basement_stairwell",
"light.basement_tall_lamp",
"light.living_room_lights",
"light.tina_lamp"
],
"data": "{\t \"color_name\":\"blue\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1430,
"y": 200,
"wires": [
[]
]
},
{
"id": "ddbbde89f52be826",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Restore State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.amazon_package_delivered_restore"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1320,
"y": 80,
"wires": [
[
"9726bd70b6b83774"
]
]
},
{
"id": "9726bd70b6b83774",
"type": "delay",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"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": 1455,
"y": 80,
"wires": [
[
"5fbac3420d43ef9d"
]
],
"l": false
},
{
"id": "5fbac3420d43ef9d",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Restore State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.amazon_package_delivered_adaptive_restore"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1600,
"y": 80,
"wires": [
[]
]
},
{
"id": "d336afe957a65e33",
"type": "delay",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1195,
"y": 320,
"wires": [
[
"398d300c5d0b6db5"
]
],
"l": false
},
{
"id": "e2f0e53daa198581",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Hue Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.living_room_lights",
"light.tina_lamp"
],
"data": "{\t \"color_name\":\"blue\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1430,
"y": 380,
"wires": [
[]
]
},
{
"id": "398d300c5d0b6db5",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Restore State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.amazon_package_delivered_restore"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1320,
"y": 320,
"wires": [
[
"d92ae2f7fd3171b5"
]
]
},
{
"id": "d92ae2f7fd3171b5",
"type": "delay",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"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": 1455,
"y": 320,
"wires": [
[
"96496719d1c09515"
]
],
"l": false
},
{
"id": "96496719d1c09515",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Restore State",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.amazon_package_delivered_adaptive_restore"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1600,
"y": 320,
"wires": [
[]
]
},
{
"id": "15fde8d3275b8455",
"type": "api-current-state",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "People Present?",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.people_present",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "people-present",
"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": 390,
"y": 180,
"wires": [
[
"6091f5e58812f97f",
"fe7b309fe37cf8e2"
],
[]
],
"outputLabels": [
"yes",
"no"
]
},
{
"id": "fe7b309fe37cf8e2",
"type": "subflow:6429099c4571dd6b",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "",
"x": 600,
"y": 80,
"wires": [
[]
]
},
{
"id": "458ddfa9d748f88f",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Adaptive Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_basement_studio",
"switch.adaptive_lighting_living_room",
"switch.adaptive_lighting_tina_lamp"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1250,
"y": 200,
"wires": [
[
"d8b6743cb853018d"
]
]
},
{
"id": "37bdac2c9a4e2837",
"type": "api-call-service",
"z": "9a8e84bd2945505e",
"g": "0c81dfaed25d225c",
"name": "Adaptive Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.adaptive_lighting_living_room",
"switch.adaptive_lighting_tina_lamp"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1250,
"y": 380,
"wires": [
[
"e2f0e53daa198581"
]
]
},
{
"id": "14c6951746b58a38",
"type": "server-events",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "iOS Action Fired",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "ios.action_fired",
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$outputData(\"eventData\").event_type",
"valueType": "jsonata"
}
],
"x": 160,
"y": 340,
"wires": [
[
"533921a587f031d4"
]
]
},
{
"id": "533921a587f031d4",
"type": "switch",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "",
"property": "payload.event.actionName",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "mb-climate",
"vt": "str"
},
{
"t": "eq",
"v": "Goodnight",
"vt": "str"
},
{
"t": "eq",
"v": "Give Me Darkness",
"vt": "str"
},
{
"t": "cont",
"v": "lights",
"vt": "str"
},
{
"t": "eq",
"v": "Basement On",
"vt": "str"
},
{
"t": "eq",
"v": "Dinner Is Ready",
"vt": "str"
},
{
"t": "eq",
"v": "Prepare To Leave",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 7,
"x": 295,
"y": 340,
"wires": [
[
"65240dc52617459d"
],
[
"bc5f205fd5e7582e"
],
[
"1516f464e4d87c56"
],
[
"e21a948e9523bce7"
],
[
"b57e12eb73074535"
],
[
"93b718cd47747ccc"
],
[
"c8af362d48d5c0ad"
]
],
"l": false
},
{
"id": "65240dc52617459d",
"type": "switch",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Climate",
"property": "payload.event.actionName",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "manual-day",
"vt": "str"
},
{
"t": "cont",
"v": "manual-night",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 440,
"y": 120,
"wires": [
[
"d3763c0194214956"
],
[
"638703bd017d6e5b"
]
]
},
{
"id": "d3763c0194214956",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "MB Climate Manual Day",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "button",
"service": "press",
"areaId": [],
"deviceId": [],
"entityId": [
"button.master_bedroom_day_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 650,
"y": 80,
"wires": [
[]
]
},
{
"id": "638703bd017d6e5b",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "MB Climate Manual Night",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "button",
"service": "press",
"areaId": [],
"deviceId": [],
"entityId": [
"button.master_bedroom_night_mode"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 650,
"y": 140,
"wires": [
[]
]
},
{
"id": "bc5f205fd5e7582e",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Goodnight",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "button",
"service": "press",
"areaId": [],
"deviceId": [],
"entityId": [
"button.goodnight"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 610,
"y": 200,
"wires": [
[]
]
},
{
"id": "1516f464e4d87c56",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Give Me Darkness",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "give_me_darkness",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 630,
"y": 260,
"wires": [
[]
]
},
{
"id": "e21a948e9523bce7",
"type": "switch",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Lights",
"property": "payload.event.actionName",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "floor",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 430,
"y": 340,
"wires": [
[
"6ec2fd7aaaf1fc98"
],
[
"89f6119d5702185b"
]
]
},
{
"id": "6ec2fd7aaaf1fc98",
"type": "switch",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Floors",
"property": "payload.event.actionName",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "second",
"vt": "str"
},
{
"t": "cont",
"v": "first",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 590,
"y": 340,
"wires": [
[
"c5e9589db7e0b0bf"
],
[
"50cf93faa2e3996c"
]
]
},
{
"id": "c5e9589db7e0b0bf",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Second Floor",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "toggle",
"areaId": [],
"deviceId": [],
"entityId": [
"light.second_floor_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 810,
"y": 320,
"wires": [
[]
]
},
{
"id": "50cf93faa2e3996c",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "First Floor",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "toggle",
"areaId": [],
"deviceId": [],
"entityId": [
"light.first_floor_lights"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 800,
"y": 380,
"wires": [
[]
]
},
{
"id": "89f6119d5702185b",
"type": "function",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Rooms",
"func": "var room = msg.payload.event.actionName\n\nif (room === \"lights-basement-studio\") {\n msg.room = \"light.basement_studio_lights\"\n} else if (room === \"lights-living-room\") {\n msg.room = \"light.living_room_lights\"\n} else if (room === \"lights-dining-room-lamp\") {\n msg.room = \"light.dining_room_lamp\"\n} else if (room === \"lights-tina-lamp\") {\n msg.room = \"light.tina_lamp\"\n} else if (room === \"lights-mud-room\") {\n msg.room = \"light.mud_room_overhead\"\n} else if (room === \"lights-upstairs-hallway\") {\n msg.room = \"light.hallway_overhead\"\n} else if (room === \"lights-upstairs-bathroom\") {\n msg.room = \"light.upstairs_bathroom_lights\"\n} else if (room === \"lights-master-bedroom\") {\n msg.room = \"light.master_bedroom_lights\"\n} else if (room === \"lights-kallen-bedroom\") {\n msg.room = \"light.kallen_bedroom_lights\"\n} else if (room === \"lights-emma_bedroom\") {\n msg.room = \"light.emma_bedroom_light\"\n} else if (room === \"lights-front-porch\") {\n msg.room = \"light.front_porch_light\"\n} else if (room === \"lights-furnace-room\") {\n msg.room = \"light.furnace_room_overhead\"\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 440,
"wires": [
[
"15ae48c0b6e70f36"
]
]
},
{
"id": "15ae48c0b6e70f36",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Toggle Lights",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "toggle",
"areaId": [],
"deviceId": [],
"entityId": [
"{{room}}"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 810,
"y": 440,
"wires": [
[]
]
},
{
"id": "572b2040be874f4e",
"type": "link out",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "iOS Action - Basement On",
"mode": "link",
"links": [
"1f5808147fa975cf"
],
"x": 465,
"y": 500,
"wires": []
},
{
"id": "b57e12eb73074535",
"type": "change",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "ios",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 395,
"y": 500,
"wires": [
[
"572b2040be874f4e"
]
],
"l": false
},
{
"id": "f5aff29df4e07a4a",
"type": "switch",
"z": "bb961e59e2ef86c9",
"g": "26f91eb2ef77450d",
"name": "",
"property": "payload.event.actionName",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "YES",
"vt": "str"
},
{
"t": "cont",
"v": "NO",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 535,
"y": 740,
"wires": [
[
"7107656a6cbecce7"
],
[]
],
"l": false
},
{
"id": "7107656a6cbecce7",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "26f91eb2ef77450d",
"name": "Kallen PC On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "kallen_desktop_wake",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 680,
"y": 740,
"wires": [
[
"d8c62e34298105b4"
]
]
},
{
"id": "6bb57058f0a576e7",
"type": "server-events",
"z": "bb961e59e2ef86c9",
"g": "26f91eb2ef77450d",
"name": "iOS Notification Action Fired",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "ios.notification_action_fired",
"exposeToHomeAssistant": false,
"eventData": "",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$outputData(\"eventData\").event_type",
"valueType": "jsonata"
}
],
"x": 210,
"y": 740,
"wires": [
[
"e97b782efaaf5976"
]
]
},
{
"id": "e97b782efaaf5976",
"type": "switch",
"z": "bb961e59e2ef86c9",
"g": "26f91eb2ef77450d",
"name": "",
"property": "payload.event.actionName",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "KALLEN_PC",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 395,
"y": 740,
"wires": [
[
"2a0e3a76af7ab628"
]
],
"l": false
},
{
"id": "93b718cd47747ccc",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Dinner Is Ready",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "dinner_is_ready",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 460,
"y": 560,
"wires": [
[]
]
},
{
"id": "c8af362d48d5c0ad",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "f519aff597ece351",
"name": "Prepare To Leave",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "we_are_leaving",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 470,
"y": 620,
"wires": [
[]
]
},
{
"id": "d8c62e34298105b4",
"type": "delay",
"z": "bb961e59e2ef86c9",
"g": "26f91eb2ef77450d",
"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": 815,
"y": 740,
"wires": [
[
"900c251ff10a2f5b"
]
],
"l": false
},
{
"id": "900c251ff10a2f5b",
"type": "api-call-service",
"z": "bb961e59e2ef86c9",
"g": "26f91eb2ef77450d",
"name": "Clear Notification",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": msg.user,\t \"type\":\"alert\",\t \"message\":\"clear_notification\",\t \"tag\":\"kallen_PC\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 970,
"y": 740,
"wires": [
[]
]
},
{
"id": "2a0e3a76af7ab628",
"type": "function",
"z": "bb961e59e2ef86c9",
"g": "26f91eb2ef77450d",
"name": "user conversion",
"func": "var userTrigger = msg.payload.context.user_id\n\nif (userTrigger === \"c3909d27048140729f002aaef0391775\") {\n msg.user = \"tony\"\n} else if (userTrigger === \"f387a983651a4321a7411ff8cf36f949\") {\n msg.user = \"tina\"\n} else if (userTrigger === \"879b4c04e32841b3ad1d2763a11b4e70\") {\n msg.user = \"kallen\"\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 465,
"y": 740,
"wires": [
[
"f5aff29df4e07a4a"
]
],
"l": false
},
{
"id": "a4c477269b22f766",
"type": "ha-button",
"z": "ee67610b4a0578d2",
"g": "477e752fcd2e2a19",
"name": "Send Button",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "f14ef3df2209e9a7",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 110,
"y": 80,
"wires": [
[
"f4bfbaca4d7fb1df"
]
]
},
{
"id": "9cafa6212280b2d5",
"type": "ha-button",
"z": "ee67610b4a0578d2",
"g": "477e752fcd2e2a19",
"name": "Reset Button",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "1c6757ac2fa1a199",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "Words go here and stuff",
"valueType": "str"
},
{
"property": "topic",
"propertyType": "msg",
"value": "Living Room",
"valueType": "str"
},
{
"property": "voice",
"propertyType": "msg",
"value": "Brian",
"valueType": "str"
}
],
"x": 110,
"y": 140,
"wires": [
[
"5095d45c90d5304f"
]
]
},
{
"id": "5095d45c90d5304f",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "477e752fcd2e2a19",
"name": "Reset Message",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.tts_message"
],
"data": "{\t \"value\": msg.payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 300,
"y": 140,
"wires": [
[
"3ae21589dd88c080"
]
]
},
{
"id": "3ae21589dd88c080",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "477e752fcd2e2a19",
"name": "Reset Devices List",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.tts_devices"
],
"data": "{\t \"option\": msg.topic\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 510,
"y": 140,
"wires": [
[
"b2bc83c9195efe0f"
]
]
},
{
"id": "93b7bee28a7e896e",
"type": "subflow:6429099c4571dd6b",
"z": "ee67610b4a0578d2",
"g": "477e752fcd2e2a19",
"name": "",
"x": 500,
"y": 80,
"wires": [
[]
]
},
{
"id": "b2bc83c9195efe0f",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "477e752fcd2e2a19",
"name": "Reset Voice",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.announcement_voice"
],
"data": "{\t \"option\": msg.voice\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 710,
"y": 140,
"wires": [
[]
]
},
{
"id": "f803c6af3a30eb66",
"type": "ha-button",
"z": "ee67610b4a0578d2",
"g": "50e4d951ee7b3e54",
"name": "Send Report",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "675dd216a61c575b",
"outputProperties": [],
"x": 110,
"y": 240,
"wires": [
[
"a6234b2047ba3116"
]
]
},
{
"id": "3bd7704103dbfc20",
"type": "template",
"z": "ee67610b4a0578d2",
"g": "50e4d951ee7b3e54",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{\n \"content\": \"{{text}}\",\n \"project_id\": 2285967948,\n \"section_id\": {{type}}\n}",
"output": "str",
"x": 460,
"y": 240,
"wires": [
[]
]
},
{
"id": "a6234b2047ba3116",
"type": "function",
"z": "ee67610b4a0578d2",
"g": "50e4d951ee7b3e54",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar text = states['input_text.report_system'].state\nvar type = states['input_select.report_type'].state\n\nmsg.text = text\n\nif (type === \"New Idea\") {\n node.status({fill:\"green\",shape:\"dot\",text:\"New Idea\"});\n msg.type = \"81234669\"\n} else if (type === \"Bug Report\") {\n node.status({fill:\"green\",shape:\"dot\",text:\"Bug Report\"});\n msg.type = \"94865633\"\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 240,
"wires": [
[
"3bd7704103dbfc20"
]
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "788eb0a1551db9b8",
"type": "ha-button",
"z": "ee67610b4a0578d2",
"g": "50e4d951ee7b3e54",
"name": "Reset Report",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "7df85e301aad3a3d",
"outputProperties": [
{
"property": "text",
"propertyType": "msg",
"value": "Type your report here",
"valueType": "str"
},
{
"property": "type",
"propertyType": "msg",
"value": "Bug Report",
"valueType": "str"
}
],
"x": 110,
"y": 300,
"wires": [
[
"7674185d1e5ee489"
]
]
},
{
"id": "7674185d1e5ee489",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "50e4d951ee7b3e54",
"name": "Reset Text",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.report_system"
],
"data": "{\t \"value\": msg.text\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 290,
"y": 300,
"wires": [
[
"427cc2991454bbf0"
]
]
},
{
"id": "427cc2991454bbf0",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "50e4d951ee7b3e54",
"name": "Reset Type",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.report_type"
],
"data": "{\t \"option\": msg.type\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 470,
"y": 300,
"wires": [
[]
]
},
{
"id": "98626a8f2b59bde3",
"type": "ha-button",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Send Notification",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "f040a57e80fda8ee",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 120,
"y": 440,
"wires": [
[
"f44427c5a493c428"
]
]
},
{
"id": "47bc783fd78f5aa8",
"type": "ha-button",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Reset Text Notification",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "56690d428d1d2022",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 140,
"y": 540,
"wires": [
[
"d2fec32d385dae8c"
]
]
},
{
"id": "db6d955c039873be",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Text Notify",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "text_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"type\": msg.priority,\t \"who\": msg.phones,\t \"title\": msg.title,\t \"message\": msg.payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 490,
"y": 400,
"wires": [
[]
]
},
{
"id": "d2fec32d385dae8c",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Reset Title",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.text_notification_title"
],
"data": "{\t \"value\":\"Type your title here\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 350,
"y": 540,
"wires": [
[
"0145961e8276c53e"
]
]
},
{
"id": "0145961e8276c53e",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Reset Body",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_text",
"service": "set_value",
"areaId": [],
"deviceId": [],
"entityId": [
"input_text.text_notification"
],
"data": "{\t \"value\":\"Type your notification here\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 530,
"y": 540,
"wires": [
[
"fd623c46a558a01a"
]
]
},
{
"id": "fd623c46a558a01a",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Reset Options",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.select_phones",
"input_select.select_tvs"
],
"data": "{\t \"option\":\"None\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 720,
"y": 540,
"wires": [
[
"6b039ef7895476e2"
]
]
},
{
"id": "c52cae79eb97bcc0",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "TV Notify",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\": msg.tvs,\t \"title\": msg.title,\t \"message\": msg.payload\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 480,
"y": 480,
"wires": [
[]
]
},
{
"id": "6b039ef7895476e2",
"type": "api-call-service",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Reset Priority",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.text_notification_priority_level"
],
"data": "{\t \"option\":\"Normal\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 920,
"y": 540,
"wires": [
[]
]
},
{
"id": "3c03edd9c35f85f8",
"type": "comment",
"z": "ee67610b4a0578d2",
"g": "50e4d951ee7b3e54",
"name": "Create Task",
"info": "",
"x": 630,
"y": 240,
"wires": []
},
{
"id": "f4bfbaca4d7fb1df",
"type": "function",
"z": "ee67610b4a0578d2",
"g": "477e752fcd2e2a19",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar message = states['input_text.tts_message'].state\nvar who = states['input_select.tts_devices'].state\nvar voice = states['input_select.announcement_voice'].state\n\nmsg.payload = message\nmsg.topic = who\nmsg.voice = voice\n\nnode.status({fill:\"green\",shape:\"dot\",text:voice + \" speaking in \" + who});\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 80,
"wires": [
[
"93b7bee28a7e896e"
]
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "f44427c5a493c428",
"type": "function",
"z": "ee67610b4a0578d2",
"g": "5595964c8367c984",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar title = states['input_text.text_notification_title'].state\nvar message = states['input_text.text_notification'].state\nvar priority = states['input_select.text_notification_priority_level'].state\nvar phones = states['input_select.select_phones'].state.toLowerCase()\nvar tvs = states['input_select.select_tvs'].state.toLowerCase()\n\nvar phoneMsg = {\n \"title\": title,\n \"payload\": message,\n \"priority\": priority,\n \"phones\": phones\n}\nvar tvsMsg = {\n \"title\": title,\n \"payload\": message,\n \"priority\": priority,\n \"tvs\": tvs\n}\n\nif (phones != 'none' && tvs != 'none') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Phones and TVs\"});\n return[phoneMsg,tvsMsg]\n} else if (phones === 'none' && tvs != 'none') {\n node.status({fill:\"green\",shape:\"dot\",text:\"TVs Only\"});\n return[null,tvsMsg]\n} else if (phones != 'none' && tvs === 'none') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Phones Only\"});\n return[phoneMsg,null]\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"No devices selected\"});\n return null\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 310,
"y": 440,
"wires": [
[
"db6d955c039873be"
],
[
"c52cae79eb97bcc0"
]
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "5d7c63526234945e",
"type": "api-render-template",
"z": "ebd5561c4f077718",
"name": "",
"server": "9e87348d.9c1c48",
"version": 0,
"template": "{%- macro getReport() -%}\n\n {{ states('sensor.current_conditions_detail') }}\n {{ states('sensor.tomorrow_forecast_detail') }}\n {{ states('sensor.clothing_forecast_detail') }}\n\n {% if states('sensor.weatheralerts_active_alerts') > '0' %}\n Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weather_alerts_active_corrected') }}. They are as follows.\n {{ states('sensor.weather_alert_string') }}.\n {% endif %}\n\n{%- endmacro -%}\n\n\n{# a macro that removes all newline characters, empty spaces, and returns formatted text #}\n{%- macro cleanup(data) -%}\n {%- for item in data.split(\"\\n\") if item | trim != \"\" -%}\n {{ item | trim }} {% endfor -%}\n{%- endmacro -%}\n\n{# a macro to call all macros :) #}\n{%- macro mother_of_all_macros() -%}\n {{ getReport() }}\n{%- endmacro -%}\n \n{# Call the macro #}\n{{- cleanup(mother_of_all_macros()) -}}",
"resultsLocation": "payload",
"resultsLocationType": "msg",
"templateLocation": "template",
"templateLocationType": "msg",
"x": 280,
"y": 180,
"wires": [
[
"6b5d3e550ad76528"
]
]
},
{
"id": "7aaddacf84721c78",
"type": "inject",
"z": "ebd5561c4f077718",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "300",
"crontab": "",
"once": true,
"onceDelay": "1",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 110,
"y": 180,
"wires": [
[
"5d7c63526234945e"
]
]
},
{
"id": "6b5d3e550ad76528",
"type": "file",
"z": "ebd5561c4f077718",
"name": "",
"filename": "/config/files/weather_briefing_full.txt",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 520,
"y": 180,
"wires": [
[]
]
},
{
"id": "1031080bdf3b95bf",
"type": "server-state-changed",
"z": "789ba711dc04fad2",
"name": "Twitch Stream Status",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.twitch_ironnerd24",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 140,
"y": 220,
"wires": [
[
"4a51b2cf2fe4c02c"
]
],
"outputLabels": [
"Live",
"Offline"
]
},
{
"id": "dcf595a3aeb025a4",
"type": "api-call-service",
"z": "789ba711dc04fad2",
"name": "Turn on boolean",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.studio_quiet"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 600,
"y": 200,
"wires": [
[]
]
},
{
"id": "21deb99e77dfa74d",
"type": "api-call-service",
"z": "789ba711dc04fad2",
"name": "Turn off boolean",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.studio_quiet"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 600,
"y": 320,
"wires": [
[]
]
},
{
"id": "e6aea47391a1f784",
"type": "api-call-service",
"z": "789ba711dc04fad2",
"name": "Basement DnD On",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.basement_echo_dot_do_not_disturb_switch"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 610,
"y": 260,
"wires": [
[]
]
},
{
"id": "3f97e618415f37c5",
"type": "api-call-service",
"z": "789ba711dc04fad2",
"name": "Basement DnD Off",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.basement_echo_dot_do_not_disturb_switch"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 610,
"y": 380,
"wires": [
[]
]
},
{
"id": "dc05476aa4d90974",
"type": "api-call-service",
"z": "789ba711dc04fad2",
"name": "TV Notifications",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"who\":\"all\",\t \"title\": \"Stream Starting\",\t \"message\": \"Tony has started a live stream in the studio!\",\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"30%\",\t \"color\": \"indigo\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 600,
"y": 140,
"wires": [
[]
]
},
{
"id": "efade953371aa59e",
"type": "mqtt out",
"z": "789ba711dc04fad2",
"name": "MQTT Publish",
"topic": "house/studio/live",
"qos": "1",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 600,
"y": 80,
"wires": []
},
{
"id": "3eef2b6b25a9b04f",
"type": "mqtt out",
"z": "789ba711dc04fad2",
"name": "MQTT Publish",
"topic": "house/studio/live",
"qos": "1",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 600,
"y": 440,
"wires": []
},
{
"id": "596e7ae95bf50ffd",
"type": "link in",
"z": "789ba711dc04fad2",
"name": "Cleanup - Twitch",
"links": [
"619d1474239faf58"
],
"x": 95,
"y": 320,
"wires": [
[
"f5e5f17c682ddb8c"
]
]
},
{
"id": "f5e5f17c682ddb8c",
"type": "api-current-state",
"z": "789ba711dc04fad2",
"name": "State",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.twitch_ironnerd24",
"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": 320,
"wires": [
[
"4a51b2cf2fe4c02c"
]
],
"outputLabels": [
"Live",
"Offline"
]
},
{
"id": "4a51b2cf2fe4c02c",
"type": "function",
"z": "789ba711dc04fad2",
"name": "Processing",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar vacationMode = states['input_boolean.vacation_mode'].state\nvar peoplePresent = states['binary_sensor.people_present'].state\nvar streamLive = msg.payload\n\nif (vacationMode === 'off' && peoplePresent === 'on') {\n if (streamLive === 'streaming') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Stream Live\"});\n return[msg,null]\n } else {\n node.status({fill:\"red\",shape:\"ring\",text:\"Stream Offline\"});\n return[null,msg]\n }\n} else {\n node.status({fill:\"grey\",shape:\"dot\",text:\"Skipped\"});\n return null\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 260,
"wires": [
[
"e6aea47391a1f784",
"dcf595a3aeb025a4",
"dc05476aa4d90974",
"efade953371aa59e"
],
[
"21deb99e77dfa74d",
"3f97e618415f37c5",
"3eef2b6b25a9b04f"
]
],
"icon": "node-red-contrib-cpu/cpu.png"
},
{
"id": "c2972c7728c99c43",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Conversions",
"func": "msg.payload = (msg.payload / 1024000000)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 255,
"y": 200,
"wires": [
[
"bc09f451754ba126"
]
],
"l": false
},
{
"id": "bc09f451754ba126",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 315,
"y": 200,
"wires": [
[
"adc20601e249dc44"
]
],
"l": false
},
{
"id": "fdefcd6a64aa9bca",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "CPU Temp",
"topic": "glances/basement-server/sensors/Package_id_0/value",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 120,
"y": 80,
"wires": [
[
"b0fee451dea6b00c"
]
]
},
{
"id": "da305ace22579c07",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Memory Used",
"topic": "glances/basement-server/mem/used",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 130,
"y": 200,
"wires": [
[
"c2972c7728c99c43"
]
]
},
{
"id": "7ecdec08d9698a19",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "CPU Usage",
"topic": "glances/basement-server/cpu/total",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 130,
"y": 140,
"wires": [
[
"ea300ecd15cbc07f"
]
]
},
{
"id": "1b5678e80095a461",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Uptime",
"topic": "glances/basement-server/uptime/seconds",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 110,
"y": 320,
"wires": [
[
"c88179f1facb8646"
]
]
},
{
"id": "c88179f1facb8646",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Conversions",
"func": "msg.payload = (msg.payload / 60) / 60\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 215,
"y": 320,
"wires": [
[
"7af97720032b4609"
]
],
"l": false
},
{
"id": "7af97720032b4609",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 275,
"y": 320,
"wires": [
[
"4f0c3e053e317dbc"
]
],
"l": false
},
{
"id": "08aadf619537949e",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Memory Usage",
"topic": "glances/basement-server/mem/percent",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 140,
"y": 260,
"wires": [
[
"bdd8715ce3cc4713"
]
]
},
{
"id": "a0adec284cd8162a",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Free Space - /",
"topic": "glances/basement-server/fs/_/free",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 130,
"y": 380,
"wires": [
[
"46e0046a27f4bc89"
]
]
},
{
"id": "46e0046a27f4bc89",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Conversions",
"func": "msg.payload = (msg.payload / 1024000000)\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 255,
"y": 380,
"wires": [
[
"a6038f6bd028bd2f"
]
],
"l": false
},
{
"id": "a6038f6bd028bd2f",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 315,
"y": 380,
"wires": [
[
"9b66a631492c2023"
]
],
"l": false
},
{
"id": "b109c8db1c2cd259",
"type": "ha-button",
"z": "ffa6a885ac41a5ed",
"g": "46275dd0f9461013",
"name": "Restart AppDaemon",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "04976a7418728aa3",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "date"
}
],
"x": 150,
"y": 780,
"wires": [
[
"75a50e8dac7af692"
]
]
},
{
"id": "75a50e8dac7af692",
"type": "api-call-service",
"z": "ffa6a885ac41a5ed",
"g": "46275dd0f9461013",
"name": "",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "hassio",
"service": "addon_restart",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"addon\":\"a0d7b954_appdaemon\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 380,
"y": 780,
"wires": [
[]
]
},
{
"id": "d5c7d4f4714a6cd6",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "CPU Load - 1 min",
"topic": "glances/basement-server/load/min1",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 150,
"y": 440,
"wires": [
[
"7e733e83ceaef1f9"
]
]
},
{
"id": "d1ac8b45d7baa4ed",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "CPU Load - 5 min",
"topic": "glances/basement-server/load/min5",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 150,
"y": 500,
"wires": [
[
"2d43bf0d5590f6bb"
]
]
},
{
"id": "35847fc20196c4ce",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "CPU Load - 15 min",
"topic": "glances/basement-server/load/min15",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 150,
"y": 560,
"wires": [
[
"febc179b34c8cf71"
]
]
},
{
"id": "c002b47a53a0e203",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Network RX",
"topic": "glances/basement-server/network/enp4s0/rx",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 130,
"y": 620,
"wires": [
[
"a46a88d4fb03cceb"
]
]
},
{
"id": "0008fb5b70ae6aea",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Network TX",
"topic": "glances/basement-server/network/enp4s0/tx",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 130,
"y": 680,
"wires": [
[
"67119024666b68bd"
]
]
},
{
"id": "a46a88d4fb03cceb",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Conversions",
"func": "msg.payload = msg.payload / 1000000\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 255,
"y": 620,
"wires": [
[
"8d26310ed06bb045"
]
],
"l": false
},
{
"id": "8d26310ed06bb045",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 315,
"y": 620,
"wires": [
[
"7ffbdab6daa40cd9"
]
],
"l": false
},
{
"id": "67119024666b68bd",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Conversions",
"func": "msg.payload = msg.payload / 1000000\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 255,
"y": 680,
"wires": [
[
"e235145192886939"
]
],
"l": false
},
{
"id": "e235145192886939",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 315,
"y": 680,
"wires": [
[
"d00db0647d1c4034"
]
],
"l": false
},
{
"id": "baae5d6f53900594",
"type": "ha-button",
"z": "ffa6a885ac41a5ed",
"g": "46275dd0f9461013",
"name": "Cleanup",
"version": 0,
"debugenabled": false,
"outputs": 1,
"entityConfig": "a11aaf0288452997",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "cleanup",
"valueType": "str"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"x": 120,
"y": 840,
"wires": [
[
"619d1474239faf58"
]
]
},
{
"id": "619d1474239faf58",
"type": "link out",
"z": "ffa6a885ac41a5ed",
"g": "46275dd0f9461013",
"name": "Cleanup",
"mode": "link",
"links": [
"6a1cecedd6ef4b44",
"596e7ae95bf50ffd"
],
"x": 235,
"y": 840,
"wires": []
},
{
"id": "b0fee451dea6b00c",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - CPU Temperature",
"entityConfig": "1d09b6c6a3773d9a",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 370,
"y": 80,
"wires": [
[]
]
},
{
"id": "adc20601e249dc44",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - Memory Used",
"entityConfig": "6cf8f103906c1a49",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 520,
"y": 200,
"wires": [
[]
]
},
{
"id": "ea300ecd15cbc07f",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - CPU Usage",
"entityConfig": "9c9d7870a5204f13",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 370,
"y": 140,
"wires": [
[]
]
},
{
"id": "4f0c3e053e317dbc",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - Uptime",
"entityConfig": "5248dc02bf48733e",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 440,
"y": 320,
"wires": [
[]
]
},
{
"id": "bdd8715ce3cc4713",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - Memory Usage",
"entityConfig": "d819e61c0895affe",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 400,
"y": 260,
"wires": [
[]
]
},
{
"id": "9b66a631492c2023",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - Free Space Root",
"entityConfig": "8006b0b34776ec34",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 510,
"y": 380,
"wires": [
[]
]
},
{
"id": "c0813ccdec033370",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - CPU Average Loads 1 min",
"entityConfig": "5fa5b04e2b1b3ae2",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 520,
"y": 440,
"wires": [
[]
]
},
{
"id": "d681fa96683511c1",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - CPU Average Loads 5 min",
"entityConfig": "6f429b0dcaa5c607",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 520,
"y": 500,
"wires": [
[]
]
},
{
"id": "e5cc046624cd5453",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Basement Server - CPU Average Loads 15 min",
"entityConfig": "9f53af3ad747cd62",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 520,
"y": 560,
"wires": [
[]
]
},
{
"id": "7ffbdab6daa40cd9",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Network RX",
"entityConfig": "80d831ad0265a01f",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 430,
"y": 620,
"wires": [
[]
]
},
{
"id": "d00db0647d1c4034",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Network TX",
"entityConfig": "069a7ab44b04c9ef",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 430,
"y": 680,
"wires": [
[]
]
},
{
"id": "ce8a6bb6e9460f13",
"type": "server-state-changed",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "Tony Desktop Power",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.tony_desktop_power",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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"
}
],
"x": 870,
"y": 80,
"wires": [
[
"ce5a2ea26f26e421"
]
]
},
{
"id": "ce5a2ea26f26e421",
"type": "mqtt out",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "",
"topic": "house/power/basement/tony_desktop",
"qos": "0",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 1190,
"y": 80,
"wires": []
},
{
"id": "abb6e16585d7fe61",
"type": "server-state-changed",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "Kallen Desktop Power",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.kallen_desktop_power",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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"
}
],
"x": 880,
"y": 140,
"wires": [
[
"aa9b2f0ddc5b77d3"
]
]
},
{
"id": "aa9b2f0ddc5b77d3",
"type": "mqtt out",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "",
"topic": "house/power/basement/kallen_desktop",
"qos": "0",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 1190,
"y": 140,
"wires": []
},
{
"id": "0a8426dd99cbaeec",
"type": "server-state-changed",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "Basement Server Power",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.basement_server_power",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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"
}
],
"x": 890,
"y": 260,
"wires": [
[
"8813b152ed76b96c"
]
]
},
{
"id": "8813b152ed76b96c",
"type": "mqtt out",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "",
"topic": "house/power/basement/basement_server",
"qos": "0",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 1200,
"y": 260,
"wires": []
},
{
"id": "9833b2aff0f97ea9",
"type": "server-state-changed",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "Tina Desktop Power",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.tina_desktop_power",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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"
}
],
"x": 870,
"y": 200,
"wires": [
[
"51d05298561cfddb"
]
]
},
{
"id": "51d05298561cfddb",
"type": "mqtt out",
"z": "ffa6a885ac41a5ed",
"g": "6504d94aaaf9b8d9",
"name": "",
"topic": "house/power/first_floor/tina_desk/tina_desktop",
"qos": "0",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 1220,
"y": 200,
"wires": []
},
{
"id": "ca88f85ba00a6744",
"type": "inject",
"z": "ffa6a885ac41a5ed",
"g": "46275dd0f9461013",
"name": "Reboot",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "120",
"topic": "reboot",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 900,
"wires": [
[
"619d1474239faf58"
]
]
},
{
"id": "7e733e83ceaef1f9",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 285,
"y": 440,
"wires": [
[
"c0813ccdec033370"
]
],
"l": false
},
{
"id": "2d43bf0d5590f6bb",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 285,
"y": 500,
"wires": [
[
"d681fa96683511c1"
]
],
"l": false
},
{
"id": "febc179b34c8cf71",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "fbbe69a14cbe0236",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 285,
"y": 560,
"wires": [
[
"e5cc046624cd5453"
]
],
"l": false
},
{
"id": "39ba20ccdc0d3291",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "CPU Usage",
"topic": "glances/minecraft/cpu/total",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 850,
"y": 360,
"wires": [
[
"be219cd63a50687b"
]
]
},
{
"id": "be219cd63a50687b",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - CPU Usage",
"entityConfig": "0d6712bde7f2c2aa",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1080,
"y": 360,
"wires": [
[]
]
},
{
"id": "be46f7e1c3d82b99",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Uptime",
"topic": "glances/minecraft/uptime/seconds",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 830,
"y": 420,
"wires": [
[
"6ba34dc18fbc940f"
]
]
},
{
"id": "6ba34dc18fbc940f",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Conversions",
"func": "var readout = (msg.payload / 60) / 60\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 935,
"y": 420,
"wires": [
[
"41ff21a8194cd9c8"
]
],
"l": false
},
{
"id": "41ff21a8194cd9c8",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - Uptime",
"entityConfig": "3dd7cd5953460bf0",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1100,
"y": 420,
"wires": [
[]
]
},
{
"id": "f3ed9c6c6beeaaf3",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Conversions",
"func": "var readout = (msg.payload / 1024000000)\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 975,
"y": 480,
"wires": [
[
"218a23a093cc070e"
]
],
"l": false
},
{
"id": "6b368cf77a061795",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Memory Used",
"topic": "glances/minecraft/mem/used",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 850,
"y": 480,
"wires": [
[
"f3ed9c6c6beeaaf3"
]
]
},
{
"id": "c947f0b38745ac21",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Memory Usage",
"topic": "glances/minecraft/mem/percent",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 860,
"y": 540,
"wires": [
[
"c3b53f37978e8fff"
]
]
},
{
"id": "3d1df2ce8b0b3388",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Free Space - /",
"topic": "glances/minecraft/fs/_/free",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 850,
"y": 600,
"wires": [
[
"82d1a3d67d7b541e"
]
]
},
{
"id": "82d1a3d67d7b541e",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Conversions",
"func": "var readout = (msg.payload / 1024000000)\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 975,
"y": 600,
"wires": [
[
"24c50ae79a4c9884"
]
],
"l": false
},
{
"id": "b43388fd2c52ca59",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "CPU Load - 1 min",
"topic": "glances/minecraft/load/min1",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 870,
"y": 660,
"wires": [
[
"aa5f280744935821"
]
]
},
{
"id": "186b89f637e64299",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "CPU Load - 5 min",
"topic": "glances/minecraft/load/min5",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 870,
"y": 720,
"wires": [
[
"81a2ac8ed788454e"
]
]
},
{
"id": "8aace1da7153a6b4",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "CPU Load - 15 min",
"topic": "glances/minecraft/load/min15",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 870,
"y": 780,
"wires": [
[
"5ba9cfc0194ef62a"
]
]
},
{
"id": "533f7ea9ff79fc13",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Network RX",
"topic": "glances/minecraft/network/ens18/rx",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 850,
"y": 840,
"wires": [
[
"1641a391e57e7e24"
]
]
},
{
"id": "f09bb064e2beade2",
"type": "mqtt in",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Network TX",
"topic": "glances/minecraft/network/ens18/tx",
"qos": "1",
"datatype": "auto-detect",
"broker": "fd29421fc00140a8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 850,
"y": 900,
"wires": [
[
"a3bf61521dbb4dba"
]
]
},
{
"id": "1641a391e57e7e24",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Conversions",
"func": "var readout = msg.payload / 1000000\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 975,
"y": 840,
"wires": [
[
"771cc9650d25ef9e"
]
],
"l": false
},
{
"id": "a3bf61521dbb4dba",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Conversions",
"func": "var readout = msg.payload / 1000000\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 975,
"y": 900,
"wires": [
[
"da4ebf48cc4bd6c4"
]
],
"l": false
},
{
"id": "218a23a093cc070e",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - Memory Used",
"entityConfig": "76cd1049416dcd40",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1140,
"y": 480,
"wires": [
[]
]
},
{
"id": "c3b53f37978e8fff",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - Memory Usage",
"entityConfig": "cb79060b1357cc09",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1110,
"y": 540,
"wires": [
[]
]
},
{
"id": "24c50ae79a4c9884",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - Free Space Root",
"entityConfig": "c8f428ea43d3c0c7",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1170,
"y": 600,
"wires": [
[]
]
},
{
"id": "9ee545081e378ada",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - CPU Average Loads 1 min",
"entityConfig": "a3a6fbcbe94daddf",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1220,
"y": 660,
"wires": [
[]
]
},
{
"id": "1159bd946a485e91",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - CPU Average Loads 5 min",
"entityConfig": "704b90ceb496c18d",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1220,
"y": 720,
"wires": [
[]
]
},
{
"id": "e81a5055a5060326",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - CPU Average Loads 15 min",
"entityConfig": "61ba199207e4396e",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1230,
"y": 780,
"wires": [
[]
]
},
{
"id": "771cc9650d25ef9e",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - Network RX",
"entityConfig": "63218fa218b9ed68",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1160,
"y": 840,
"wires": [
[]
]
},
{
"id": "da4ebf48cc4bd6c4",
"type": "ha-sensor",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Minecraft VM - Network TX",
"entityConfig": "c8bb405fd48982d7",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 1140,
"y": 900,
"wires": [
[]
]
},
{
"id": "aa5f280744935821",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1005,
"y": 660,
"wires": [
[
"9ee545081e378ada"
]
],
"l": false
},
{
"id": "81a2ac8ed788454e",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1005,
"y": 720,
"wires": [
[
"1159bd946a485e91"
]
],
"l": false
},
{
"id": "5ba9cfc0194ef62a",
"type": "function",
"z": "ffa6a885ac41a5ed",
"g": "4886967d0f8c0156",
"name": "Rounding",
"func": "var readout = msg.payload\n\nmsg.payload = +readout.toFixed(2)\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1005,
"y": 780,
"wires": [
[
"e81a5055a5060326"
]
],
"l": false
},
{
"id": "e8d2135bb5564a4a",
"type": "server-state-changed",
"z": "3e4ba157b540d183",
"name": "Voice Change",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.jarvis_voice",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 110,
"y": 40,
"wires": [
[
"a75651492e779bfc"
]
]
},
{
"id": "4d724735025b0ed8",
"type": "server-state-changed",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Work Today",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.work_today",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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"
}
],
"x": 130,
"y": 300,
"wires": [
[
"6ec62f6cf4fcf994"
]
]
},
{
"id": "6ec62f6cf4fcf994",
"type": "switch",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 430,
"y": 300,
"wires": [
[
"486bca43ddc48fb8"
]
]
},
{
"id": "71bee01e93d372c4",
"type": "inject",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "00 01 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "off",
"payloadType": "str",
"x": 610,
"y": 360,
"wires": [
[
"486bca43ddc48fb8"
]
]
},
{
"id": "31ce8ad28dd41226",
"type": "api-render-template",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Offset Before",
"server": "9e87348d.9c1c48",
"version": 0,
"template": "{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') - 5400) | timestamp_custom('%H:%M', false) }}",
"resultsLocation": "start",
"resultsLocationType": "msg",
"templateLocation": "",
"templateLocationType": "none",
"x": 410,
"y": 200,
"wires": [
[
"20271b0662a4d5df"
]
]
},
{
"id": "20271b0662a4d5df",
"type": "api-render-template",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Offset After",
"server": "9e87348d.9c1c48",
"version": 0,
"template": "{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 5400) | timestamp_custom('%H:%M', false) }}",
"resultsLocation": "stop",
"resultsLocationType": "msg",
"templateLocation": "",
"templateLocationType": "none",
"x": 590,
"y": 200,
"wires": [
[
"16bf625c802d7910"
]
]
},
{
"id": "69886cf636bf4f70",
"type": "inject",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Set Schedule",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "00 06 * * *",
"once": false,
"onceDelay": "1",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 200,
"wires": [
[
"31ce8ad28dd41226"
]
]
},
{
"id": "16bf625c802d7910",
"type": "function",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Set Times",
"func": "msg.payload = {\n \"start\": msg.start,\n \"stop\": msg.stop,\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n}\nmsg.topic = \"override\"\nnode.status({fill:\"green\",shape:\"dot\",text:msg.start + \" - \" + msg.stop});\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 760,
"y": 200,
"wires": [
[
"39f78e9aa56bc51e"
]
],
"icon": "font-awesome/fa-clock-o"
},
{
"id": "39f78e9aa56bc51e",
"type": "link out",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Schedule Settings - Send",
"mode": "link",
"links": [
"76f6b8bed6de3f97"
],
"x": 875,
"y": 200,
"wires": []
},
{
"id": "a32c37ccf0102258",
"type": "inject",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Set Workday on Reboot",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "120",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 190,
"y": 360,
"wires": [
[
"d5c6b45df763e57e"
]
]
},
{
"id": "d5c6b45df763e57e",
"type": "api-current-state",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Work Today",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.work_today",
"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": 410,
"y": 360,
"wires": [
[
"486bca43ddc48fb8"
]
]
},
{
"id": "6f011420f6bb15a7",
"type": "inject",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "Set Schedule on Reboot",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "120",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 190,
"y": 240,
"wires": [
[
"31ce8ad28dd41226"
]
]
},
{
"id": "f6f45d3e3cf9aeab",
"type": "inject",
"z": "3e4ba157b540d183",
"name": "Set Voice on Reboot",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "120",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 100,
"wires": [
[
"40c9c33453179a21"
]
]
},
{
"id": "40c9c33453179a21",
"type": "api-current-state",
"z": "3e4ba157b540d183",
"name": "Jarvis Voice",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_select.jarvis_voice",
"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": 350,
"y": 100,
"wires": [
[
"a75651492e779bfc"
]
]
},
{
"id": "74bb3d48dd17bef9",
"type": "mqtt out",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "MQTT Publish",
"topic": "house/scheduling/tina/work_today",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 1000,
"y": 300,
"wires": []
},
{
"id": "b49f0642ce0153c6",
"type": "mqtt out",
"z": "3e4ba157b540d183",
"name": "MQTT Publish",
"topic": "house/jarvis/voice",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fd29421fc00140a8",
"x": 800,
"y": 40,
"wires": []
},
{
"id": "486bca43ddc48fb8",
"type": "change",
"z": "3e4ba157b540d183",
"g": "5c50443a84910fb7",
"name": "",
"rules": [
{
"t": "set",
"p": "tinawork",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 790,
"y": 300,
"wires": [
[
"74bb3d48dd17bef9"
]
]
},
{
"id": "a75651492e779bfc",
"type": "change",
"z": "3e4ba157b540d183",
"name": "",
"rules": [
{
"t": "set",
"p": "jarvis_voice",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 580,
"y": 40,
"wires": [
[
"b49f0642ce0153c6"
]
]
},
{
"id": "a09f10883f07aad0",
"type": "server-state-changed",
"z": "3e4ba157b540d183",
"g": "265593f442864b6a",
"name": "MB Aircon Installed",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.master_bedroom_aircon_installed",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": 170,
"y": 460,
"wires": [
[
"a8d7f5e5d4f549b0"
]
]
},
{
"id": "464e9271285f8450",
"type": "api-current-state",
"z": "3e4ba157b540d183",
"g": "265593f442864b6a",
"name": "MB Aircon Installed",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.master_bedroom_aircon_installed",
"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": 350,
"y": 540,
"wires": [
[
"a8d7f5e5d4f549b0"
]
]
},
{
"id": "9c8056404bfcafed",
"type": "inject",
"z": "3e4ba157b540d183",
"g": "265593f442864b6a",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "120",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 150,
"y": 540,
"wires": [
[
"464e9271285f8450"
]
]
},
{
"id": "a8d7f5e5d4f549b0",
"type": "change",
"z": "3e4ba157b540d183",
"g": "265593f442864b6a",
"name": "",
"rules": [
{
"t": "set",
"p": "mb_aircon_installed",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 610,
"y": 460,
"wires": [
[]
]
},
{
"id": "04fdddae578ee136",
"type": "alexa-remote-event",
"z": "3e4ba157b540d183",
"name": "",
"account": "be975ce229701797",
"event": "ws-device-activity",
"x": 170,
"y": 680,
"wires": [
[
"266634bf3c6019c8",
"f9bc4d36a0df7947"
]
]
},
{
"id": "266634bf3c6019c8",
"type": "function",
"z": "3e4ba157b540d183",
"name": "Set Global Variables",
"func": "var name = msg.payload.name\nvar serial = msg.payload.deviceSerialNumber\nvar entityId = '{}'\n\nif (name === 'Basement Echo Dot') {\n var entityId = 'media_player.basement_echo_dot'\n} else if (name === 'Living Room Echo Dot') {\n var entityId = 'media_player.living_room_echo_dot'\n} else if (name === 'Master Bedroom Echo Dot') {\n var entityId = 'media_player.master_bedroom_echo_dot'\n}\n\nvar nameMsg = {\n \"payload\": name\n}\nvar serialMsg = {\n \"payload\": serial\n}\nvar entityMsg = {\n \"payload\": entityId\n}\n\nglobal.set('lastAlexaName',name)\nglobal.set('lastAlexaEntityId',entityId)\nglobal.set('lastAlexaSerial',serial)\n\nnode.status({fill:\"green\",shape:\"dot\",text:name});\n\nreturn[nameMsg,serialMsg,entityMsg];",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 680,
"wires": [
[
"4560584de593b5c1"
],
[
"488e4f61d16705d4"
],
[
"1f3142828a586d08"
]
],
"outputLabels": [
"Name",
"Serial",
"Entity ID"
],
"icon": "font-awesome/fa-globe"
},
{
"id": "4560584de593b5c1",
"type": "ha-sensor",
"z": "3e4ba157b540d183",
"name": "Name",
"entityConfig": "4118a859da3ae01f",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 630,
"y": 620,
"wires": [
[]
]
},
{
"id": "488e4f61d16705d4",
"type": "ha-sensor",
"z": "3e4ba157b540d183",
"name": "Serial",
"entityConfig": "790a5433342e7eb5",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 630,
"y": 680,
"wires": [
[]
]
},
{
"id": "1f3142828a586d08",
"type": "ha-sensor",
"z": "3e4ba157b540d183",
"name": "Entity ID",
"entityConfig": "4d3001dabc174efe",
"version": 0,
"state": "payload",
"stateType": "msg",
"attributes": [],
"inputOverride": "allow",
"outputProperties": [],
"x": 640,
"y": 740,
"wires": [
[]
]
},
{
"id": "f9bc4d36a0df7947",
"type": "debug",
"z": "3e4ba157b540d183",
"name": "Alexa Activities",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 380,
"y": 760,
"wires": []
},
{
"id": "e038489eca14b1dd",
"type": "discordMessage",
"z": "d3dcbe534743b01d",
"name": "",
"token": "fd929ec3bfbeef1a",
"x": 180,
"y": 200,
"wires": [
[
"a8a7658145e92c1d",
"e05ecd981929376b"
]
]
},
{
"id": "e5f2798df4bf16d6",
"type": "debug",
"z": "d3dcbe534743b01d",
"name": "debug-pass",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 530,
"y": 60,
"wires": []
},
{
"id": "a8a7658145e92c1d",
"type": "switch",
"z": "d3dcbe534743b01d",
"name": "",
"property": "member.roles",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "1002314506271203509",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": true,
"outputs": 2,
"x": 350,
"y": 200,
"wires": [
[
"e5f2798df4bf16d6",
"8a2f04665191a1a7"
],
[
"7742083919fb7b59"
]
]
},
{
"id": "7742083919fb7b59",
"type": "debug",
"z": "d3dcbe534743b01d",
"name": "debug-fail",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 520,
"y": 100,
"wires": []
},
{
"id": "c2b9267e3ea81cd4",
"type": "discordMessageManager",
"z": "d3dcbe534743b01d",
"d": true,
"name": "",
"channel": "",
"token": "fd929ec3bfbeef1a",
"x": 750,
"y": 280,
"wires": [
[]
]
},
{
"id": "8a2f04665191a1a7",
"type": "change",
"z": "d3dcbe534743b01d",
"d": true,
"name": "",
"rules": [
{
"t": "set",
"p": "channel",
"pt": "msg",
"to": "1002320534614323260",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Farts are fun",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 260,
"wires": [
[
"c2b9267e3ea81cd4"
]
]
},
{
"id": "d777145b11649c65",
"type": "debug",
"z": "d3dcbe534743b01d",
"name": "debug-lights",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1470,
"y": 320,
"wires": []
},
{
"id": "e05ecd981929376b",
"type": "switch",
"z": "d3dcbe534743b01d",
"name": "Permissions",
"property": "member.roles",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "1002314506271203509",
"vt": "str"
}
],
"checkall": "true",
"repair": true,
"outputs": 1,
"x": 370,
"y": 420,
"wires": [
[
"76d4b57e3b98e799"
]
]
},
{
"id": "76d4b57e3b98e799",
"type": "change",
"z": "d3dcbe534743b01d",
"name": "Prepare service data",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$split($trim($lowercase(payload)), \" \", 3)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 580,
"y": 420,
"wires": [
[
"64a02909ab4707e0"
]
]
},
{
"id": "64a02909ab4707e0",
"type": "switch",
"z": "d3dcbe534743b01d",
"name": "Service selection",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "light",
"vt": "str"
},
{
"t": "eq",
"v": "temperature",
"vt": "str"
},
{
"t": "eq",
"v": "humidity",
"vt": "str"
},
{
"t": "eq",
"v": "help",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 810,
"y": 420,
"wires": [
[
"97bc11edf2480435"
],
[],
[],
[]
]
},
{
"id": "97bc11edf2480435",
"type": "change",
"z": "d3dcbe534743b01d",
"name": "Prepare light entity",
"rules": [
{
"t": "set",
"p": "payload[1]",
"pt": "msg",
"to": "$string(payload[0]) & \" \" & $string(payload[1]) & \" \" & $string(payload[2])",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload[0]",
"pt": "msg",
"to": "light",
"tot": "str"
},
{
"t": "change",
"p": "payload[1]",
"pt": "msg",
"from": "studio",
"fromt": "str",
"to": "basement_studio_lights",
"tot": "str"
},
{
"t": "change",
"p": "payload[2]",
"pt": "msg",
"from": "off",
"fromt": "str",
"to": "turn_off",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1030,
"y": 380,
"wires": [
[
"c56e681e1210b7fb"
]
]
},
{
"id": "c56e681e1210b7fb",
"type": "template",
"z": "d3dcbe534743b01d",
"name": "Format service data",
"field": "payload",
"fieldType": "msg",
"format": "json",
"syntax": "mustache",
"template": "{\n \"domain\": \"{{payload.0}}\",\n \"service\": \"{{payload.2}}\",\n \"data\": {\"entity_id\":\"{{payload.1}}\"}\n}",
"output": "json",
"x": 1260,
"y": 380,
"wires": [
[
"34bfc4d501d21f17",
"d777145b11649c65"
]
]
},
{
"id": "34bfc4d501d21f17",
"type": "api-call-service",
"z": "d3dcbe534743b01d",
"name": "Call light service",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "",
"service": "",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1480,
"y": 380,
"wires": [
[]
]
},
{
"id": "6a28a84de488e39d",
"type": "debug",
"z": "d3dcbe534743b01d",
"name": "fs22status",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 560,
"wires": []
},
{
"id": "229adf0d8b27fd7c",
"type": "server-state-changed",
"z": "d3dcbe534743b01d",
"name": "FS22 Server Status",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.win10_vm_processactive",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 190,
"y": 560,
"wires": [
[
"305cc8b15072569c"
]
]
},
{
"id": "305cc8b15072569c",
"type": "switch",
"z": "d3dcbe534743b01d",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "0",
"vt": "str"
},
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 370,
"y": 560,
"wires": [
[
"69b1f5484ee668b9"
],
[
"d8ace9a59d21cad0"
]
],
"outputLabels": [
"Up",
"Down"
]
},
{
"id": "d9170dbc46fa2c0b",
"type": "discordMessageManager",
"z": "d3dcbe534743b01d",
"name": "Send Message",
"channel": "",
"token": "fd929ec3bfbeef1a",
"x": 740,
"y": 560,
"wires": [
[
"6a28a84de488e39d"
]
]
},
{
"id": "69b1f5484ee668b9",
"type": "change",
"z": "d3dcbe534743b01d",
"name": "Up message",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Farming Simulator 22 server is up and running!",
"tot": "str"
},
{
"t": "set",
"p": "channel",
"pt": "msg",
"to": "912503253973999617",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 530,
"y": 520,
"wires": [
[
"d9170dbc46fa2c0b"
]
]
},
{
"id": "d8ace9a59d21cad0",
"type": "change",
"z": "d3dcbe534743b01d",
"name": "Down message",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Farming Simulator 22 server is down!",
"tot": "str"
},
{
"t": "set",
"p": "channel",
"pt": "msg",
"to": "912503253973999617",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 540,
"y": 580,
"wires": [
[
"d9170dbc46fa2c0b"
]
]
},
{
"id": "9c86355f531c84a2",
"type": "hue-bridge-node",
"z": "d49b385d8b582b20",
"d": true,
"name": "",
"bridge": "359a4a5e8f156ab5",
"autoupdates": true,
"skipglobalevents": false,
"initevents": false,
"x": 310,
"y": 140,
"wires": [
[
"9b70596b25181506"
]
]
},
{
"id": "9b70596b25181506",
"type": "debug",
"z": "d49b385d8b582b20",
"d": true,
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 140,
"wires": []
},
{
"id": "7b20f670ec9cb8c5",
"type": "inject",
"z": "d49b385d8b582b20",
"d": true,
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "fetch",
"payloadType": "str",
"x": 110,
"y": 140,
"wires": [
[
"9c86355f531c84a2"
]
]
},
{
"id": "bf2ad73a.23bdb8",
"type": "change",
"z": "d49b385d8b582b20",
"name": "Save Secret",
"rules": [
{
"t": "set",
"p": "#:(secrets)::secret_id",
"pt": "global",
"to": "secret_value",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 250,
"y": 240,
"wires": [
[]
]
},
{
"id": "5c5c19b4.549de8",
"type": "inject",
"z": "d49b385d8b582b20",
"name": "Press",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 110,
"y": 240,
"wires": [
[
"bf2ad73a.23bdb8"
]
]
},
{
"id": "635934334d5cf6a5",
"type": "http request",
"z": "d49b385d8b582b20",
"name": "Get Todoist API Info",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "https://api.todoist.com/sync/v9/sync?sync_token='*'&resource_types=[\"all\"]",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "bearer",
"senderr": false,
"headers": [],
"x": 990,
"y": 80,
"wires": [
[
"c4b9e44cd5ad6448"
]
]
},
{
"id": "c821804b2468d585",
"type": "inject",
"z": "d49b385d8b582b20",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 800,
"y": 80,
"wires": [
[
"635934334d5cf6a5"
]
]
},
{
"id": "c4b9e44cd5ad6448",
"type": "debug",
"z": "d49b385d8b582b20",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1170,
"y": 80,
"wires": []
},
{
"id": "2a6fe7c07c6b34e1",
"type": "subflow:3aa2aec226246753",
"z": "d49b385d8b582b20",
"name": "",
"x": 290,
"y": 400,
"wires": []
},
{
"id": "942304b8743cdd40",
"type": "inject",
"z": "d49b385d8b582b20",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 120,
"y": 400,
"wires": [
[
"2a6fe7c07c6b34e1"
]
]
},
{
"id": "7ddf9ea.ce1666",
"type": "trigger",
"z": "d49b385d8b582b20",
"name": "",
"op1": "1",
"op2": "0",
"op1type": "num",
"op2type": "num",
"duration": "5",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "stop",
"bytopic": "all",
"topic": "topic",
"outputs": 2,
"x": 260,
"y": 540,
"wires": [
[
"9cd45d14.c50fc",
"d0e34d98.f2042"
],
[
"9cd45d14.c50fc",
"4666b91c.95c868"
]
]
},
{
"id": "4f9f0445.d36d2c",
"type": "inject",
"z": "d49b385d8b582b20",
"name": "motion",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "1",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 110,
"y": 540,
"wires": [
[
"7ddf9ea.ce1666"
]
]
},
{
"id": "d0e34d98.f2042",
"type": "debug",
"z": "d49b385d8b582b20",
"name": "Switch on",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 420,
"y": 480,
"wires": []
},
{
"id": "4666b91c.95c868",
"type": "debug",
"z": "d49b385d8b582b20",
"name": "Switch off",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 420,
"y": 600,
"wires": []
},
{
"id": "9cd45d14.c50fc",
"type": "debug",
"z": "d49b385d8b582b20",
"name": "The Lamp",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 560,
"y": 540,
"wires": []
},
{
"id": "4c6b1c69069e01e9",
"type": "inject",
"z": "d49b385d8b582b20",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "stop",
"payloadType": "str",
"x": 110,
"y": 600,
"wires": [
[
"7ddf9ea.ce1666"
]
]
},
{
"id": "e1e9f6fcdc3bb5b0",
"type": "server-events",
"z": "d49b385d8b582b20",
"d": true,
"name": "",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "alexa_actionable_notification",
"exposeToHomeAssistant": false,
"eventData": "",
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$outputData(\"eventData\").event_type",
"valueType": "jsonata"
}
],
"event_type": "",
"x": 680,
"y": 320,
"wires": [
[
"4b2ffb86973bb4be"
]
]
},
{
"id": "4b2ffb86973bb4be",
"type": "debug",
"z": "d49b385d8b582b20",
"d": true,
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 320,
"wires": []
},
{
"id": "87a6983fc1885649",
"type": "comment",
"z": "d49b385d8b582b20",
"name": "Alexa Actionable Notifications Tester",
"info": "",
"x": 800,
"y": 260,
"wires": []
},
{
"id": "77ba0ad52b2a9e2e",
"type": "server-events",
"z": "d49b385d8b582b20",
"name": "Overwolf Events Dump",
"server": "9e87348d.9c1c48",
"version": 2,
"eventType": "overwolf_game_event",
"exposeToHomeAssistant": true,
"eventData": "",
"haConfig": [
{
"property": "name",
"value": "Overwolf Events Dump"
},
{
"property": "icon",
"value": "mdi:test-tube"
}
],
"waitForRunning": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$outputData(\"eventData\").event_type",
"valueType": "jsonata"
}
],
"event_type": "",
"x": 160,
"y": 720,
"wires": [
[
"59892c31142ac295"
]
]
},
{
"id": "59892c31142ac295",
"type": "file",
"z": "d49b385d8b582b20",
"name": "Write to overwolf.txt",
"filename": "/config/files/overwolf.txt",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "false",
"encoding": "none",
"x": 390,
"y": 720,
"wires": [
[]
]
},
{
"id": "40ca6bea6784da85",
"type": "inject",
"z": "d49b385d8b582b20",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 680,
"y": 460,
"wires": [
[
"aafbf681a5ad4f1c"
]
]
},
{
"id": "e5408c2d11c0c492",
"type": "debug",
"z": "d49b385d8b582b20",
"name": "msg1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1030,
"y": 440,
"wires": []
},
{
"id": "aafbf681a5ad4f1c",
"type": "function",
"z": "d49b385d8b582b20",
"name": "Heat Threshold",
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar hightemp = states['sensor.todays_high_temp'].state\nvar threshold = states['input_number.master_bedroom_daytime_threshold'].state\n\nif (hightemp >= threshold) {\n return [msg,null];\n} else {\n return [null,msg];\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 860,
"y": 460,
"wires": [
[
"e5408c2d11c0c492"
],
[
"0eaecf8072527ff5"
]
]
},
{
"id": "0eaecf8072527ff5",
"type": "debug",
"z": "d49b385d8b582b20",
"name": "msg2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1030,
"y": 500,
"wires": []
}
]