diff --git a/flows.json b/flows.json index ba6fa31..be0041c 100644 --- a/flows.json +++ b/flows.json @@ -925,7 +925,7 @@ "5b3a0cf1ee7d06b9" ], "x": 14, - "y": 839, + "y": 899, "w": 1552, "h": 462 }, @@ -988,12 +988,21 @@ "5ee549aa5e97d4a5", "b4d619d31ec9121d", "d1dd42ebc53343df", - "1fc55a133a7d82c4" + "1fc55a133a7d82c4", + "36a5e45ee36fcbe2", + "0fd3ca1a3ed64401", + "85bd42cee08444fd", + "861a396ba3bf0d56", + "f45a0d8baae959b5", + "7d8c66e00ef77f8d", + "78c0322d29366568", + "5bacd4a2ac40653e", + "daaad13ae2186cd9" ], "x": 14, "y": 11.5, - "w": 1312, - "h": 809.5 + "w": 1412, + "h": 869.5 }, { "id": "5c50443a84910fb7", @@ -2395,12 +2404,21 @@ "6f9810d3986b67d9", "15e2eb94a67c7024", "77082c90f1eb9c32", - "88037340df0708d0" + "88037340df0708d0", + "b215043fa5be662c", + "f73bafc60ff9e5f2", + "884a8e6d817c7967", + "9205b99d38e82365", + "95a5cf5ddd094259", + "0e9f7b643d88d033", + "e90b458cb1c65066", + "8b62859b69ad50b0", + "100eaa9f8701dbab" ], "x": 14, - "y": 1319, - "w": 1092, - "h": 742 + "y": 1379, + "w": 1412, + "h": 802 }, { "id": "a09584861c2fe558", @@ -2424,7 +2442,7 @@ "1f2b0cb7e79e145a", "62b761bce85aecb7" ], - "x": 1374, + "x": 1434, "y": 79, "w": 352, "h": 622 @@ -2792,8 +2810,8 @@ "7593f77568c03db2", "30679e01160e2e2e" ], - "x": 1134, - "y": 1319, + "x": 1434, + "y": 1379, "w": 332, "h": 382 }, @@ -2988,7 +3006,7 @@ "z": "72f99805df043603", "g": "5802ea32c1de36e8", "x": 400, - "y": 1780, + "y": 1840, "wires": [ [] ] @@ -21675,7 +21693,7 @@ "g": "39a7ac02f2727f1d", "name": "", "x": 780, - "y": 1200, + "y": 1260, "wires": [ [] ] @@ -21997,7 +22015,7 @@ "entity_location": "data", "override_data": "msg", "x": 700, - "y": 1000, + "y": 1060, "wires": [ [ "62211bf089bc5b04", @@ -22035,7 +22053,7 @@ "domain": "light", "service": "turn_on", "x": 1240, - "y": 1000, + "y": 1060, "wires": [ [ "7b390a3b24fc3197" @@ -22099,7 +22117,7 @@ "domain": "input_boolean", "service": "turn_{{toggle}}", "x": 700, - "y": 880, + "y": 940, "wires": [ [] ] @@ -22150,7 +22168,7 @@ } ], "x": 110, - "y": 1060, + "y": 1120, "wires": [ [ "61405a43f61f3d60" @@ -22255,7 +22273,7 @@ "finalize": "", "libs": [], "x": 450, - "y": 1060, + "y": 1120, "wires": [ [ "17e5f9acd57c2819", @@ -22303,7 +22321,7 @@ "domain": "switch", "service": "turn_off", "x": 1010, - "y": 1000, + "y": 1060, "wires": [ [ "d0dacbae4513b1ad" @@ -22329,7 +22347,7 @@ "allowrate": false, "outputs": 1, "x": 1135, - "y": 1000, + "y": 1060, "wires": [ [ "acb52adc50d34045" @@ -22356,7 +22374,7 @@ "allowrate": false, "outputs": 1, "x": 1345, - "y": 1000, + "y": 1060, "wires": [ [ "a417e93366843249" @@ -22391,7 +22409,7 @@ "domain": "input_select", "service": "select_option", "x": 1470, - "y": 1000, + "y": 1060, "wires": [ [] ] @@ -22410,7 +22428,7 @@ "templateLocation": "", "templateLocationType": "none", "x": 635, - "y": 940, + "y": 1000, "wires": [ [ "a8070806c0f88856" @@ -22445,7 +22463,7 @@ "domain": "input_datetime", "service": "set_datetime", "x": 770, - "y": 940, + "y": 1000, "wires": [ [] ] @@ -22477,7 +22495,7 @@ "domain": "input_datetime", "service": "set_datetime", "x": 780, - "y": 1140, + "y": 1200, "wires": [ [] ] @@ -22496,7 +22514,7 @@ "templateLocation": "", "templateLocationType": "none", "x": 635, - "y": 1140, + "y": 1200, "wires": [ [ "3937c38bc1bd0ee0" @@ -22536,7 +22554,7 @@ "entity_location": "data", "override_data": "msg", "x": 860, - "y": 1020, + "y": 1080, "wires": [ [ "62211bf089bc5b04" @@ -23161,7 +23179,7 @@ "finalize": "", "libs": [], "x": 400, - "y": 880, + "y": 940, "wires": [ [ "d6b56cb65c2ff140" @@ -23192,7 +23210,7 @@ "domain": "", "service": "", "x": 690, - "y": 1080, + "y": 1140, "wires": [ [] ] @@ -23211,7 +23229,7 @@ "templateLocation": "", "templateLocationType": "none", "x": 635, - "y": 1200, + "y": 1260, "wires": [ [ "b4dbbf788c5a30d2" @@ -23247,7 +23265,7 @@ "domain": "light", "service": "turn_on", "x": 1210, - "y": 940, + "y": 1000, "wires": [ [] ] @@ -23279,7 +23297,7 @@ "domain": "timer", "service": "cancel", "x": 1010, - "y": 940, + "y": 1000, "wires": [ [ "a2c9a6a52d4d2591" @@ -23508,7 +23526,7 @@ "saturday": true, "ignorePastDate": false, "x": 120, - "y": 880, + "y": 940, "wires": [ [ "476f73cf6b540f96" @@ -23560,7 +23578,7 @@ "saturday": true, "ignorePastDate": false, "x": 120, - "y": 940, + "y": 1000, "wires": [ [ "476f73cf6b540f96" @@ -23606,7 +23624,7 @@ "saturday": true, "ignorePastDate": false, "x": 120, - "y": 1120, + "y": 1180, "wires": [ [ "61405a43f61f3d60" @@ -23697,7 +23715,7 @@ "domain": "input_boolean", "service": "turn_on", "x": 740, - "y": 1260, + "y": 1320, "wires": [ [] ] @@ -23828,7 +23846,7 @@ } ], "x": 170, - "y": 1360, + "y": 1420, "wires": [ [ "61f25466213cb85c" @@ -23872,7 +23890,7 @@ } ], "x": 170, - "y": 1420, + "y": 1480, "wires": [ [ "34d7881576b29949", @@ -23917,7 +23935,7 @@ } ], "x": 180, - "y": 1600, + "y": 1660, "wires": [ [ "34d7881576b29949", @@ -23962,7 +23980,7 @@ } ], "x": 190, - "y": 1660, + "y": 1720, "wires": [ [ "34d7881576b29949", @@ -24016,7 +24034,7 @@ } ], "x": 190, - "y": 1720, + "y": 1780, "wires": [ [ "34d7881576b29949", @@ -24075,7 +24093,7 @@ "saturday": true, "ignorePastDate": false, "x": 150, - "y": 1480, + "y": 1540, "wires": [ [ "34d7881576b29949", @@ -24134,7 +24152,7 @@ "saturday": true, "ignorePastDate": false, "x": 150, - "y": 1540, + "y": 1600, "wires": [ [ "34d7881576b29949", @@ -24167,7 +24185,7 @@ } ], "x": 210, - "y": 1780, + "y": 1840, "wires": [ [ "03c668f84022cc23", @@ -24194,7 +24212,7 @@ } ], "x": 650, - "y": 1720, + "y": 1780, "wires": [ [ "a273dadf7a256af1" @@ -24215,7 +24233,7 @@ "finalize": "", "libs": [], "x": 470, - "y": 1540, + "y": 1600, "wires": [ [ "53b440a31d30df1b" @@ -24259,7 +24277,7 @@ "domain": "", "service": "", "x": 650, - "y": 1480, + "y": 1540, "wires": [ [ "bb9595faa1592fd9" @@ -24291,7 +24309,7 @@ "domain": "", "service": "", "x": 650, - "y": 1540, + "y": 1600, "wires": [ [] ] @@ -24310,7 +24328,7 @@ "finalize": "", "libs": [], "x": 650, - "y": 1600, + "y": 1660, "wires": [ [ "ccb3a655b7d6836b" @@ -24342,7 +24360,7 @@ "domain": "script", "service": "text_notify", "x": 840, - "y": 1600, + "y": 1660, "wires": [ [] ] @@ -24361,7 +24379,7 @@ "finalize": "", "libs": [], "x": 1000, - "y": 1420, + "y": 1480, "wires": [] }, { @@ -24383,7 +24401,7 @@ "payload": "", "payloadType": "date", "x": 885, - "y": 1360, + "y": 1420, "wires": [ [ "7561647f2cdf58d3" @@ -24404,7 +24422,7 @@ ], "uncaught": false, "x": 830, - "y": 1480, + "y": 1540, "wires": [ [ "7561647f2cdf58d3" @@ -24456,7 +24474,7 @@ } ], "x": 820, - "y": 1420, + "y": 1480, "wires": [ [ "7561647f2cdf58d3" @@ -24477,7 +24495,7 @@ "finalize": "", "libs": [], "x": 410, - "y": 1360, + "y": 1420, "wires": [ [ "53b440a31d30df1b" @@ -24506,7 +24524,7 @@ "finalize": "", "libs": [], "x": 665, - "y": 1660, + "y": 1720, "wires": [ [ "884ffbd2493411f9" @@ -24522,7 +24540,7 @@ "name": "EB Climate Reset - In", "links": [], "x": 595, - "y": 1660, + "y": 1720, "wires": [ [ "f6755ee93883b34d" @@ -24538,7 +24556,7 @@ "mode": "return", "links": [], "x": 735, - "y": 1660, + "y": 1720, "wires": [] }, { @@ -24553,7 +24571,7 @@ "linkType": "static", "timeout": "30", "x": 335, - "y": 1420, + "y": 1480, "wires": [ [ "34d7881576b29949" @@ -24573,7 +24591,7 @@ "linkType": "static", "timeout": "30", "x": 315, - "y": 1780, + "y": 1840, "wires": [ [ "34d7881576b29949" @@ -24608,7 +24626,7 @@ "domain": "climate", "service": "set_hvac_mode", "x": 830, - "y": 1720, + "y": 1780, "wires": [ [ "8bb8dc720af76714" @@ -24642,7 +24660,7 @@ "domain": "climate", "service": "set_preset_mode", "x": 1000, - "y": 1720, + "y": 1780, "wires": [ [] ] @@ -24661,7 +24679,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1520, + "x": 1580, "y": 120, "wires": [] }, @@ -24679,7 +24697,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1520, + "x": 1580, "y": 180, "wires": [] }, @@ -24697,7 +24715,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1530, + "x": 1590, "y": 240, "wires": [] }, @@ -24715,7 +24733,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1500, + "x": 1560, "y": 300, "wires": [] }, @@ -24733,7 +24751,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1510, + "x": 1570, "y": 360, "wires": [] }, @@ -24751,7 +24769,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1500, + "x": 1560, "y": 420, "wires": [] }, @@ -24769,7 +24787,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1540, + "x": 1600, "y": 480, "wires": [] }, @@ -24787,7 +24805,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1540, + "x": 1600, "y": 540, "wires": [] }, @@ -24821,7 +24839,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1520, + "x": 1580, "y": 600, "wires": [] }, @@ -24839,7 +24857,7 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1510, + "x": 1570, "y": 660, "wires": [] }, @@ -24858,7 +24876,7 @@ "statusVal": "", "statusType": "auto", "x": 710, - "y": 1360, + "y": 1420, "wires": [] }, { @@ -24896,7 +24914,7 @@ } ], "x": 200, - "y": 1840, + "y": 1900, "wires": [ [ "f1f2ac113fe2b639" @@ -24917,7 +24935,7 @@ "finalize": "", "libs": [], "x": 460, - "y": 1840, + "y": 1900, "wires": [ [ "334a79e6f5f3a16a", @@ -24940,7 +24958,7 @@ "statusVal": "", "statusType": "auto", "x": 670, - "y": 1840, + "y": 1900, "wires": [] }, { @@ -24957,8 +24975,8 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1280, - "y": 1360, + "x": 1580, + "y": 1420, "wires": [] }, { @@ -24975,8 +24993,8 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1290, - "y": 1420, + "x": 1590, + "y": 1480, "wires": [] }, { @@ -24993,8 +25011,8 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1260, - "y": 1480, + "x": 1560, + "y": 1540, "wires": [] }, { @@ -25011,8 +25029,8 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1260, - "y": 1540, + "x": 1560, + "y": 1600, "wires": [] }, { @@ -25029,8 +25047,8 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1280, - "y": 1600, + "x": 1580, + "y": 1660, "wires": [] }, { @@ -25047,8 +25065,8 @@ "targetType": "full", "statusVal": "", "statusType": "auto", - "x": 1270, - "y": 1660, + "x": 1570, + "y": 1720, "wires": [] }, { @@ -25060,7 +25078,7 @@ "scope": "group", "uncaught": false, "x": 1010, - "y": 1660, + "y": 1720, "wires": [ [ "7593f77568c03db2" @@ -25113,7 +25131,7 @@ "allowrate": false, "outputs": 1, "x": 545, - "y": 1480, + "y": 1540, "wires": [ [ "1e2abb7eff658e81" @@ -25171,7 +25189,7 @@ "allowrate": false, "outputs": 1, "x": 325, - "y": 1840, + "y": 1900, "wires": [ [ "71b1c6e934b85637" @@ -25190,7 +25208,7 @@ "894e510fd44b01e0" ], "x": 595, - "y": 1780, + "y": 1840, "wires": [] }, { @@ -25203,7 +25221,7 @@ "b96ad84b569ac360" ], "x": 475, - "y": 1480, + "y": 1540, "wires": [ [ "53b440a31d30df1b" @@ -25269,7 +25287,7 @@ "domain": "switch", "service": "turn_off", "x": 980, - "y": 1780, + "y": 1840, "wires": [ [] ] @@ -25353,7 +25371,7 @@ } ], "x": 780, - "y": 1780, + "y": 1840, "wires": [ [ "eee837a3c93b3abd", @@ -25395,7 +25413,7 @@ "statusVal": "", "statusType": "auto", "x": 970, - "y": 1840, + "y": 1900, "wires": [] }, { @@ -25444,7 +25462,7 @@ } ], "x": 200, - "y": 1900, + "y": 1960, "wires": [ [ "88037340df0708d0" @@ -25497,7 +25515,7 @@ } ], "x": 210, - "y": 1960, + "y": 2020, "wires": [ [ "88037340df0708d0" @@ -25550,7 +25568,7 @@ } ], "x": 210, - "y": 2020, + "y": 2080, "wires": [ [ "88037340df0708d0" @@ -25571,11 +25589,641 @@ "finalize": "", "libs": [], "x": 480, - "y": 1960, + "y": 2020, "wires": [ [] ] }, + { + "id": "b215043fa5be662c", + "type": "inject", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "Mode Switch", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "*/15 7-17 * * *", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "", + "payloadType": "date", + "x": 140, + "y": 2140, + "wires": [ + [ + "100eaa9f8701dbab" + ] + ] + }, + { + "id": "f73bafc60ff9e5f2", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "Sleep Switch", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "on", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_boolean.emma_sleeping", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "sleeping", + "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": 335, + "y": 2140, + "wires": [ + [ + "884a8e6d817c7967" + ], + [] + ], + "inputLabels": [ + "Sleep Check" + ], + "outputLabels": [ + "Sleeping", + "Not Sleeping" + ], + "l": false + }, + { + "id": "884a8e6d817c7967", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "High >= Switch", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "homeassistant.homeAssistant.states[\"input_number.emma_bedroom_mode_switch_threshold\"].state", + "halt_if_type": "global", + "halt_if_compare": "gte", + "entity_id": "sensor.todays_high_temp", + "state_type": "num", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "highTemp", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + }, + { + "property": "modeSwitchThreshold", + "propertyType": "msg", + "value": "homeassistant.homeAssistant.states[\"input_number.emma_bedroom_mode_switch_threshold\"].state", + "valueType": "global" + } + ], + "for": "0", + "forType": "num", + "forUnits": "minutes", + "override_topic": false, + "state_location": "payload", + "override_payload": "msg", + "entity_location": "data", + "override_data": "msg", + "x": 480, + "y": 2140, + "wires": [ + [ + "0e9f7b643d88d033" + ], + [] + ] + }, + { + "id": "9205b99d38e82365", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "Sched Mode", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "AC", + "halt_if_type": "str", + "halt_if_compare": "is_not", + "entity_id": "input_select.scheduled_climate_mode_emma_bedroom", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "schedMode", + "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": 910, + "y": 2140, + "wires": [ + [ + "95a5cf5ddd094259" + ], + [] + ] + }, + { + "id": "95a5cf5ddd094259", + "type": "api-call-service", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "Set to AC", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "input_select.select_option", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "input_select.scheduled_climate_mode_emma_bedroom" + ], + "labelId": [], + "data": "{\t \"option\":\"AC\"\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "input_select", + "service": "select_option", + "x": 1080, + "y": 2140, + "wires": [ + [ + "e90b458cb1c65066" + ] + ] + }, + { + "id": "0e9f7b643d88d033", + "type": "function", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "Outdoor >= Threshold", + "func": "const outdoor = global.get(\"outdoorTemp.tempInt\")\nconst thresholdEntity = global.get(\"homeassistant.homeAssistant.states['input_number.emma_bedroom_aircon_mode_threshold'].state\")\nconst threshold = parseInt(thresholdEntity)\n\nmsg.outdoor = outdoor\nmsg.modeThreshold = threshold\n\nif (outdoor >= threshold) {\n node.status({fill:\"green\",shape:\"dot\",text:`${outdoor} >= ${threshold}`})\n return msg\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:`${outdoor} < ${threshold}`})\n return null\n}", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 700, + "y": 2140, + "wires": [ + [ + "9205b99d38e82365" + ] + ] + }, + { + "id": "e90b458cb1c65066", + "type": "delay", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "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": 1195, + "y": 2140, + "wires": [ + [ + "8b62859b69ad50b0" + ] + ], + "l": false + }, + { + "id": "8b62859b69ad50b0", + "type": "api-call-service", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "Bedtime Mode", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "button.press", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "button.emma_bedroom_bedtime_mode" + ], + "labelId": [], + "data": "", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "button", + "service": "press", + "x": 1320, + "y": 2140, + "wires": [ + [] + ] + }, + { + "id": "100eaa9f8701dbab", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "5802ea32c1de36e8", + "name": "AC Installed", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "on", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_boolean.emma_bedroom_aircon_installed", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "installed", + "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": 265, + "y": 2140, + "wires": [ + [ + "f73bafc60ff9e5f2" + ], + [] + ], + "l": false + }, + { + "id": "36a5e45ee36fcbe2", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "Sleep Switch", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "on", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_boolean.master_bedroom_sleeping", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "sleeping", + "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": 335, + "y": 840, + "wires": [ + [ + "0fd3ca1a3ed64401" + ], + [] + ], + "inputLabels": [ + "Sleep Check" + ], + "outputLabels": [ + "Sleeping", + "Not Sleeping" + ], + "l": false + }, + { + "id": "0fd3ca1a3ed64401", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "High >= Switch", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "homeassistant.homeAssistant.states[\"input_number.master_bedroom_mode_switch_threshold\"].state", + "halt_if_type": "global", + "halt_if_compare": "gte", + "entity_id": "sensor.todays_high_temp", + "state_type": "num", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "highTemp", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + }, + { + "property": "modeSwitchThreshold", + "propertyType": "msg", + "value": "homeassistant.homeAssistant.states[\"input_number.master_bedroom_mode_switch_threshold\"].state", + "valueType": "global" + } + ], + "for": "0", + "forType": "num", + "forUnits": "minutes", + "override_topic": false, + "state_location": "payload", + "override_payload": "msg", + "entity_location": "data", + "override_data": "msg", + "x": 480, + "y": 840, + "wires": [ + [ + "f45a0d8baae959b5" + ], + [] + ] + }, + { + "id": "85bd42cee08444fd", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "Sched Mode", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "AC", + "halt_if_type": "str", + "halt_if_compare": "is_not", + "entity_id": "input_select.scheduled_climate_mode_master_bedroom_aircon", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "schedMode", + "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": 910, + "y": 840, + "wires": [ + [ + "861a396ba3bf0d56" + ], + [] + ] + }, + { + "id": "861a396ba3bf0d56", + "type": "api-call-service", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "Set to AC", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "input_select.select_option", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "input_select.scheduled_climate_mode_master_bedroom_aircon" + ], + "labelId": [], + "data": "{\t \"option\":\"AC\"\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "input_select", + "service": "select_option", + "x": 1080, + "y": 840, + "wires": [ + [ + "7d8c66e00ef77f8d" + ] + ] + }, + { + "id": "f45a0d8baae959b5", + "type": "function", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "Outdoor >= Threshold", + "func": "const outdoor = global.get(\"outdoorTemp.tempInt\")\nconst thresholdEntity = global.get(\"homeassistant.homeAssistant.states['input_number.master_bedroom_aircon_mode_threshold'].state\")\nconst threshold = parseInt(thresholdEntity)\n\nmsg.outdoor = outdoor\nmsg.modeThreshold = threshold\n\nif (outdoor >= threshold) {\n node.status({fill:\"green\",shape:\"dot\",text:`${outdoor} >= ${threshold}`})\n return msg\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:`${outdoor} < ${threshold}`})\n return null\n}", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 700, + "y": 840, + "wires": [ + [ + "85bd42cee08444fd" + ] + ] + }, + { + "id": "7d8c66e00ef77f8d", + "type": "delay", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "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": 1195, + "y": 840, + "wires": [ + [ + "78c0322d29366568" + ] + ], + "l": false + }, + { + "id": "78c0322d29366568", + "type": "api-call-service", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "Bedtime Mode", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "button.press", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "button.master_bedroom_bedtime_mode" + ], + "labelId": [], + "data": "", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "button", + "service": "press", + "x": 1320, + "y": 840, + "wires": [ + [] + ] + }, + { + "id": "5bacd4a2ac40653e", + "type": "api-current-state", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "AC Installed", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "on", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_boolean.master_bedroom_aircon_installed", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "installed", + "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": 265, + "y": 840, + "wires": [ + [ + "36a5e45ee36fcbe2" + ], + [] + ], + "l": false + }, + { + "id": "daaad13ae2186cd9", + "type": "inject", + "z": "72f99805df043603", + "g": "e065b1ed4938b477", + "name": "Mode Switch", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "*/15 7-17 * * *", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "", + "payloadType": "date", + "x": 140, + "y": 840, + "wires": [ + [ + "5bacd4a2ac40653e" + ] + ] + }, { "id": "48b8af9419ed18d6", "type": "subflow:384eaf2f63dcb5db",