Forgot to add living room lights to K's activity timer flow

This commit is contained in:
2023-03-30 00:56:38 -04:00
parent 41417e9d61
commit df7ec47533

View File

@ -1306,7 +1306,6 @@
"7fc67fc156c0f4be",
"34dcb204b421710d",
"797d3e7cc53d773f",
"4d4e55cea59da9ad",
"e69ad4771494c458",
"fdf9b6820eb7289a",
"5c44fd504453ae63",
@ -1319,8 +1318,6 @@
"736d7433005436b3",
"0aa29248b560c45d",
"b8ca8a1a2655570b",
"c43df123937fd07d",
"fc26a2c43e3a3faa",
"24abb932c4cd0b1f",
"c0521b53f7efeb17",
"95d5ac486b4f9ee0",
@ -1331,7 +1328,8 @@
"93a52960301bb3a3",
"0e39331337b021bb",
"82172c8ab1a9c8e2",
"afeb1d238a623c3d"
"afeb1d238a623c3d",
"49dbe17ff03ed572"
],
"x": 34,
"y": 39,
@ -1373,9 +1371,7 @@
"e59180a1a6ae0a90"
],
"x": 1094,
"y": 659,
"w": 632,
"h": 82
"y": 659
},
{
"id": "265593f442864b6a",
@ -4923,34 +4919,6 @@
[]
]
},
{
"id": "4d4e55cea59da9ad",
"type": "api-call-service",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Basement Lights Scene",
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "input_select",
"service": "select_option",
"areaId": [],
"deviceId": [],
"entityId": [
"input_select.basement_studio_scenes"
],
"data": "{\t \"option\":\"Kallen Reading\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1020,
"y": 80,
"wires": [
[]
]
},
{
"id": "50056b099a24a824",
"type": "subflow:6429099c4571dd6b",
@ -5118,8 +5086,8 @@
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1030,
"y": 140,
"x": 980,
"y": 80,
"wires": [
[
"d6728df5d1fdf67e"
@ -5171,8 +5139,8 @@
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1205,
"y": 140,
"x": 1155,
"y": 80,
"wires": [
[
"ae7073e78053da5d"
@ -5202,8 +5170,8 @@
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1350,
"y": 140,
"x": 1300,
"y": 80,
"wires": [
[]
]
@ -5544,73 +5512,6 @@
],
"l": false
},
{
"id": "c43df123937fd07d",
"type": "switch",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Lights?",
"property": "lights",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 720,
"y": 120,
"wires": [
[
"fc26a2c43e3a3faa"
],
[]
]
},
{
"id": "fc26a2c43e3a3faa",
"type": "switch",
"z": "4a8821853d4dd1ad",
"g": "a46fc8e7e70ca893",
"name": "Routing",
"property": "room",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Basement",
"vt": "str"
},
{
"t": "eq",
"v": "Kallen Bedroom",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 845,
"y": 120,
"wires": [
[
"4d4e55cea59da9ad"
],
[
"908543f7b78f7beb"
]
],
"l": false
},
{
"id": "24abb932c4cd0b1f",
"type": "api-current-state",
@ -6072,18 +5973,19 @@
"y": 160,
"wires": [
[
"c43df123937fd07d",
"b2d071ca42e4a3c6",
"b8ca8a1a2655570b"
],
[
"c43df123937fd07d",
"b2d071ca42e4a3c6",
"b8ca8a1a2655570b"
"b8ca8a1a2655570b",
"49dbe17ff03ed572"
],
[
"b2d071ca42e4a3c6",
"b8ca8a1a2655570b"
"b8ca8a1a2655570b",
"49dbe17ff03ed572"
],
[
"b2d071ca42e4a3c6",
"b8ca8a1a2655570b",
"49dbe17ff03ed572"
]
],
"outputLabels": [
@ -6167,6 +6069,116 @@
],
"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",
@ -20439,7 +20451,7 @@
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "Activity",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@ -20541,7 +20553,7 @@
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "Duration",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@ -20602,7 +20614,7 @@
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "Location",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@ -20791,7 +20803,7 @@
"type": "debug",
"z": "5c4ac37140a54ac9",
"name": "End",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@ -20901,7 +20913,7 @@
"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 + \"s\" });\n return msg;\n } else {\n msg.who = who\n node.status({ fill: \"green\", shape: \"dot\", text: \"Unchanged, \" + msg.duration + \"s\" });\n return msg;\n }\n} else {\n node.status({ fill: \"red\", shape: \"ring\", text: \"No Response\" });\n return null\n}",
"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": "",
@ -20920,7 +20932,7 @@
"type": "function",
"z": "5c4ac37140a54ac9",
"name": "Filtering",
"func": "var responseType = msg.payload.event.event_response_type\n\nif (responseType === 'ResponseNone') {\n return null\n} else {\n return msg;\n}",
"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": "",
@ -25511,7 +25523,7 @@
"type": "debug",
"z": "3e4ba157b540d183",
"name": "Alexa Activities",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,