diff --git a/flows.json b/flows.json index ac185bc..72d0744 100644 --- a/flows.json +++ b/flows.json @@ -87,6 +87,21 @@ "info": "", "env": [] }, + { + "id": "c19dee9f.e72838", + "type": "tab", + "label": "Hallway" + }, + { + "id": "c7f876875da48b87", + "type": "tab", + "label": "Bathroom" + }, + { + "id": "6dfa989bb120e6c6", + "type": "tab", + "label": "presence" + }, { "id": "e52c44dc.71cb5", "type": "subflow", @@ -19917,25 +19932,11 @@ [] ] }, - { - "type": "tab", - "label": "Hallway", - "id": "c19dee9f.e72838" - }, { "id": "1be4d360986fd1f1", "type": "server-state-changed", "z": "c19dee9f.e72838", "name": "Hallway smart switch", - "wires": [ - [ - "9bea73aa40198378", - "hllw_sw_onhold_01", - "hllw_sw_brup_01", - "hllw_sw_brdn_01", - "hllw_sw_dbg_01" - ] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 1, @@ -19982,21 +19983,22 @@ } ], "x": 160, - "y": 120 + "y": 120, + "wires": [ + [ + "9bea73aa40198378", + "hllw_sw_onhold_01", + "hllw_sw_brup_01", + "hllw_sw_brdn_01", + "hllw_sw_dbg_01" + ] + ] }, { "id": "9bea73aa40198378", "type": "switch", "z": "c19dee9f.e72838", "name": "On/Off check", - "wires": [ - [ - "3369429b11ec6c87" - ], - [ - "492a8c0fafdb95c0" - ] - ], "property": "payload", "propertyType": "msg", "rules": [ @@ -20015,26 +20017,31 @@ "repair": false, "outputs": 2, "x": 470, - "y": 60 + "y": 220, + "wires": [ + [ + "3369429b11ec6c87" + ], + [ + "492a8c0fafdb95c0" + ] + ] }, { "id": "93521b5966f6fca9", "type": "comment", "z": "c19dee9f.e72838", "name": "Hallway Lights on/off switch", - "wires": [], "info": "", "x": 180, - "y": 80 + "y": 80, + "wires": [] }, { "id": "28b5f90c956f8589", "type": "api-call-service", "z": "c19dee9f.e72838", "name": "Turn on/off lights hallway", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -20056,13 +20063,18 @@ "domain": "light", "service": "turn_on", "x": 1790, - "y": 260 + "y": 260, + "wires": [ + [] + ] }, { "id": "3369429b11ec6c87", "type": "subflow:52430f5e9f9ee267", "z": "c19dee9f.e72838", "name": "", + "x": 890, + "y": 280, "wires": [ [ "9e21108d47dd29fe" @@ -20082,33 +20094,23 @@ [ "hllw_br_state_01" ] - ], - "x": 930, - "y": 60 + ] }, { "id": "c2c1acbc73dc80f4", "type": "comment", "z": "c19dee9f.e72838", "name": "Hallway Motion sensor", - "wires": [], "info": "", - "x": 140, - "y": 420 + "x": 160, + "y": 480, + "wires": [] }, { "id": "c4a4ba3c5f68d440", "type": "server-state-changed", "z": "c19dee9f.e72838", "name": "Hallway motion sensor", - "wires": [ - [ - "3369429b11ec6c87", - "4b6861fef07dcf9c", - "cb510a92532ea7f5" - ], - [] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -20156,21 +20158,22 @@ "valueType": "triggerId" } ], - "x": 140, - "y": 460 + "x": 160, + "y": 520, + "wires": [ + [ + "3369429b11ec6c87", + "4b6861fef07dcf9c", + "cb510a92532ea7f5" + ], + [] + ] }, { "id": "hllw_timebased_01", "type": "server-state-changed", "z": "c19dee9f.e72838", "name": "Hallway Time Based Turn On", - "wires": [ - [ - "3369429b11ec6c87", - "4b6861fef07dcf9c", - "cb510a92532ea7f5" - ] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 1, @@ -20216,19 +20219,21 @@ "valueType": "triggerId" } ], - "x": 160, - "y": 520 + "x": 180, + "y": 580, + "wires": [ + [ + "3369429b11ec6c87", + "4b6861fef07dcf9c", + "cb510a92532ea7f5" + ] + ] }, { "id": "492a8c0fafdb95c0", "type": "change", "z": "c19dee9f.e72838", "name": "Brightness to 0 (turn off)", - "wires": [ - [ - "28b5f90c956f8589" - ] - ], "rules": [ { "t": "set", @@ -20243,19 +20248,19 @@ "from": "", "to": "", "reg": false, - "x": 1310, - "y": 380 + "x": 1350, + "y": 560, + "wires": [ + [ + "28b5f90c956f8589" + ] + ] }, { "id": "dcd933bc4929181e", "type": "change", "z": "c19dee9f.e72838", "name": "Brightness to 20%", - "wires": [ - [ - "28b5f90c956f8589" - ] - ], "rules": [ { "t": "set", @@ -20271,18 +20276,18 @@ "to": "", "reg": false, "x": 1310, - "y": 200 + "y": 280, + "wires": [ + [ + "28b5f90c956f8589" + ] + ] }, { "id": "9e21108d47dd29fe", "type": "change", "z": "c19dee9f.e72838", "name": "Brightness to 100%", - "wires": [ - [ - "28b5f90c956f8589" - ] - ], "rules": [ { "t": "set", @@ -20298,18 +20303,18 @@ "to": "", "reg": false, "x": 1310, - "y": 120 + "y": 200, + "wires": [ + [ + "28b5f90c956f8589" + ] + ] }, { "id": "da8f36cbc0df2e8c", "type": "change", "z": "c19dee9f.e72838", "name": "Brightness to 65%", - "wires": [ - [ - "28b5f90c956f8589" - ] - ], "rules": [ { "t": "set", @@ -20325,18 +20330,18 @@ "to": "", "reg": false, "x": 1310, - "y": 160 + "y": 240, + "wires": [ + [ + "28b5f90c956f8589" + ] + ] }, { "id": "1e4d5008dcd7fb69", "type": "change", "z": "c19dee9f.e72838", "name": "Flash at brightness 100%", - "wires": [ - [ - "28b5f90c956f8589" - ] - ], "rules": [ { "t": "set", @@ -20351,19 +20356,19 @@ "from": "", "to": "", "reg": false, - "x": 1310, - "y": 420 + "x": 1350, + "y": 600, + "wires": [ + [ + "28b5f90c956f8589" + ] + ] }, { "id": "4b6861fef07dcf9c", "type": "trigger", "z": "c19dee9f.e72838", "name": "Trigger 4:30min for flash", - "wires": [ - [ - "1e4d5008dcd7fb69" - ] - ], "op1": "", "op2": "offf", "op1type": "nul", @@ -20377,18 +20382,18 @@ "topic": "topic", "outputs": 1, "x": 710, - "y": 500 + "y": 560, + "wires": [ + [ + "1e4d5008dcd7fb69" + ] + ] }, { "id": "cb510a92532ea7f5", "type": "trigger", "z": "c19dee9f.e72838", "name": "Trigger 5:00 min for off", - "wires": [ - [ - "492a8c0fafdb95c0" - ] - ], "op1": "", "op2": "offf", "op1type": "nul", @@ -20402,21 +20407,18 @@ "topic": "topic", "outputs": 1, "x": 700, - "y": 460 + "y": 520, + "wires": [ + [ + "492a8c0fafdb95c0" + ] + ] }, { "id": "hllw_sw_onhold_01", "type": "switch", "z": "c19dee9f.e72838", "name": "On hold", - "wires": [ - [ - "9e21108d47dd29fe" - ], - [ - "dcd933bc4929181e" - ] - ], "property": "payload", "propertyType": "msg", "rules": [ @@ -20435,21 +20437,21 @@ "repair": false, "outputs": 2, "x": 460, - "y": 140 + "y": 140, + "wires": [ + [ + "9e21108d47dd29fe" + ], + [ + "dcd933bc4929181e" + ] + ] }, { "id": "hllw_sw_brup_01", "type": "switch", "z": "c19dee9f.e72838", "name": "Brightness check - Up press/hold", - "wires": [ - [ - "hllw_sw_inc_01" - ], - [ - "hllw_sw_inc_01" - ] - ], "property": "payload", "propertyType": "msg", "rules": [ @@ -20468,21 +20470,21 @@ "repair": false, "outputs": 2, "x": 540, - "y": 180 + "y": 60, + "wires": [ + [ + "hllw_sw_inc_01" + ], + [ + "hllw_sw_inc_01" + ] + ] }, { "id": "hllw_sw_brdn_01", "type": "switch", "z": "c19dee9f.e72838", "name": "Brightness check - Down press/hold", - "wires": [ - [ - "hllw_sw_dec_01" - ], - [ - "hllw_sw_dec_01" - ] - ], "property": "payload", "propertyType": "msg", "rules": [ @@ -20501,18 +20503,21 @@ "repair": false, "outputs": 2, "x": 540, - "y": 220 + "y": 100, + "wires": [ + [ + "hllw_sw_dec_01" + ], + [ + "hllw_sw_dec_01" + ] + ] }, { "id": "hllw_sw_inc_01", "type": "change", "z": "c19dee9f.e72838", "name": "Brightness increase (smooth)", - "wires": [ - [ - "28b5f90c956f8589" - ] - ], "rules": [ { "t": "set", @@ -20527,19 +20532,19 @@ "from": "", "to": "", "reg": false, - "x": 1340, - "y": 240 + "x": 1320, + "y": 60, + "wires": [ + [ + "28b5f90c956f8589" + ] + ] }, { "id": "hllw_sw_dec_01", "type": "change", "z": "c19dee9f.e72838", "name": "Brightness decrease (smooth)", - "wires": [ - [ - "28b5f90c956f8589" - ] - ], "rules": [ { "t": "set", @@ -20554,15 +20559,19 @@ "from": "", "to": "", "reg": false, - "x": 1350, - "y": 280 + "x": 1330, + "y": 100, + "wires": [ + [ + "28b5f90c956f8589" + ] + ] }, { "id": "hllw_sw_dbg_01", "type": "debug", "z": "c19dee9f.e72838", "name": "Hallway Switch Debug", - "wires": [], "active": false, "tosidebar": true, "console": false, @@ -20572,31 +20581,24 @@ "statusVal": "", "statusType": "auto", "x": 180, - "y": 200 + "y": 200, + "wires": [] }, { "id": "hllw_goodbye_comment_01", "type": "comment", "z": "c19dee9f.e72838", "name": "Goodbye button", - "wires": [], "info": "", - "x": 160, - "y": 600 + "x": 140, + "y": 660, + "wires": [] }, { "id": "hllw_goodbye_trigger_01", "type": "server-state-changed", "z": "c19dee9f.e72838", "name": "Goodbye button", - "wires": [ - [ - "hllw_goodbye_espresso_01", - "hllw_goodbye_harmony_01", - "hllw_goodbye_heos_01", - "hllw_goodbye_lights_01" - ] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 1, @@ -20642,23 +20644,26 @@ "valueType": "triggerId" } ], - "x": 160, - "y": 640 + "x": 140, + "y": 700, + "wires": [ + [ + "hllw_goodbye_espresso_01", + "hllw_goodbye_harmony_01", + "hllw_goodbye_heos_01", + "hllw_goodbye_lights_01" + ] + ] }, { "id": "hllw_goodbye_espresso_01", "type": "api-call-service", "z": "c19dee9f.e72838", "name": "Espresso off", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, "action": "switch.turn_off", - "domain": "switch", - "service": "turn_off", "floorId": [], "areaId": [], "deviceId": [], @@ -20673,23 +20678,23 @@ "outputProperties": [], "queue": "none", "blockInputOverrides": false, - "x": 500, - "y": 600 + "domain": "switch", + "service": "turn_off", + "x": 510, + "y": 700, + "wires": [ + [] + ] }, { "id": "hllw_goodbye_harmony_01", "type": "api-call-service", "z": "c19dee9f.e72838", "name": "Harmony off", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, "action": "remote.turn_off", - "domain": "remote", - "service": "turn_off", "floorId": [], "areaId": [], "deviceId": [], @@ -20704,23 +20709,23 @@ "outputProperties": [], "queue": "none", "blockInputOverrides": false, - "x": 500, - "y": 640 + "domain": "remote", + "service": "turn_off", + "x": 510, + "y": 740, + "wires": [ + [] + ] }, { "id": "hllw_goodbye_heos_01", "type": "api-call-service", "z": "c19dee9f.e72838", "name": "HEOS pause", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, "action": "media_player.media_pause", - "domain": "media_player", - "service": "media_pause", "floorId": [], "areaId": [], "deviceId": [], @@ -20737,23 +20742,23 @@ "outputProperties": [], "queue": "none", "blockInputOverrides": false, - "x": 500, - "y": 680 + "domain": "media_player", + "service": "media_pause", + "x": 510, + "y": 780, + "wires": [ + [] + ] }, { "id": "hllw_goodbye_lights_01", "type": "api-call-service", "z": "c19dee9f.e72838", "name": "Lights off (LR/BR/Bath)", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, "action": "light.turn_off", - "domain": "light", - "service": "turn_off", "floorId": [], "areaId": [], "deviceId": [], @@ -20770,19 +20775,19 @@ "outputProperties": [], "queue": "none", "blockInputOverrides": false, - "x": 500, - "y": 720 + "domain": "light", + "service": "turn_off", + "x": 550, + "y": 820, + "wires": [ + [] + ] }, { "id": "hllw_br_state_01", "type": "api-current-state", "z": "c19dee9f.e72838", "name": "Bedroom ceiling brightness", - "wires": [ - [ - "hllw_br_switch_01" - ] - ], "server": "657c7463.48e1e4", "version": 3, "outputs": 1, @@ -20809,22 +20814,19 @@ "for": 0, "forType": "num", "forUnits": "minutes", - "x": 1120, - "y": 300 + "x": 1340, + "y": 400, + "wires": [ + [ + "hllw_br_switch_01" + ] + ] }, { "id": "hllw_br_switch_01", "type": "switch", "z": "c19dee9f.e72838", "name": "Bedroom brightness > 50%?", - "wires": [ - [ - "da8f36cbc0df2e8c" - ], - [ - "dcd933bc4929181e" - ] - ], "property": "data.attributes.brightness", "propertyType": "msg", "rules": [ @@ -20840,19 +20842,34 @@ "checkall": "false", "repair": false, "outputs": 2, - "x": 1400, - "y": 300 + "x": 1340, + "y": 440, + "wires": [ + [ + "da8f36cbc0df2e8c" + ], + [ + "dcd933bc4929181e" + ] + ] }, { - "type": "tab", - "label": "Bathroom", - "id": "c7f876875da48b87" + "id": "d62ce1b52df12205", + "type": "comment", + "z": "c19dee9f.e72838", + "name": "When bedroom is lit - use more brightness", + "info": "", + "x": 1380, + "y": 360, + "wires": [] }, { "id": "13c933aa7d791e63", "type": "subflow:52430f5e9f9ee267", "z": "c7f876875da48b87", "name": "", + "x": 670, + "y": 160, "wires": [ [ "cc46642a3ea04954" @@ -20872,20 +20889,13 @@ [ "bath_br_state_01" ] - ], - "x": 670, - "y": 160 + ] }, { "id": "8ff99e0276ad242f", "type": "trigger", "z": "c7f876875da48b87", "name": "Wait 4:30 min", - "wires": [ - [ - "ce6d7cb10437a4ac" - ] - ], "op1": "", "op2": "270", "op1type": "nul", @@ -20899,18 +20909,18 @@ "topic": "topic", "outputs": 1, "x": 600, - "y": 360 + "y": 360, + "wires": [ + [ + "ce6d7cb10437a4ac" + ] + ] }, { "id": "a2887d07baac63d5", "type": "trigger", "z": "c7f876875da48b87", "name": "Wait for 5:00 min", - "wires": [ - [ - "ce6d7cb10437a4ac" - ] - ], "op1": "", "op2": "300", "op1type": "nul", @@ -20924,18 +20934,18 @@ "topic": "topic", "outputs": 1, "x": 610, - "y": 320 + "y": 320, + "wires": [ + [ + "ce6d7cb10437a4ac" + ] + ] }, { "id": "173369324c7a842c", "type": "change", "z": "c7f876875da48b87", "name": "Flash at brightness 100%", - "wires": [ - [ - "3013e31f0b3d9303" - ] - ], "rules": [ { "t": "set", @@ -20951,19 +20961,18 @@ "to": "", "reg": false, "x": 1150, - "y": 440 + "y": 440, + "wires": [ + [ + "3013e31f0b3d9303" + ] + ] }, { "id": "812f8294add5575c", "type": "server-state-changed", "z": "c7f876875da48b87", "name": "Bathroom lights on", - "wires": [ - [ - "eab005bf8b682c46" - ], - [] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -21010,19 +21019,19 @@ } ], "x": 150, - "y": 240 + "y": 240, + "wires": [ + [ + "eab005bf8b682c46" + ], + [] + ] }, { "id": "23f3fd10ac242022", "type": "server-state-changed", "z": "c7f876875da48b87", "name": "Bathroom Humidity Changed", - "wires": [ - [ - "f1a2b3c4d5e60001" - ], - [] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -21069,16 +21078,19 @@ } ], "x": 180, - "y": 1040 + "y": 1040, + "wires": [ + [ + "f1a2b3c4d5e60001" + ], + [] + ] }, { "id": "b2a9a137a909e257", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Turn on fan", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -21100,18 +21112,16 @@ "domain": "switch", "service": "turn_on", "x": 670, - "y": 1040 + "y": 1040, + "wires": [ + [] + ] }, { "id": "7e4f4bb9c0c9ef2b", "type": "trigger", "z": "c7f876875da48b87", "name": "Wait for 5:00", - "wires": [ - [ - "82599133dd2b9883" - ] - ], "op1": "", "op2": "5 minutes past", "op1type": "nul", @@ -21125,19 +21135,18 @@ "topic": "topic", "outputs": 1, "x": 670, - "y": 1120 + "y": 1120, + "wires": [ + [ + "82599133dd2b9883" + ] + ] }, { "id": "82599133dd2b9883", "type": "api-current-state", "z": "c7f876875da48b87", "name": "Get Bathroom Humidity", - "wires": [ - [ - "d6e7f8a9b0c10002" - ], - [] - ], "server": "657c7463.48e1e4", "version": 3, "outputs": 2, @@ -21170,16 +21179,19 @@ "entity_location": "data", "override_data": "msg", "x": 950, - "y": 1120 + "y": 1120, + "wires": [ + [ + "d6e7f8a9b0c10002" + ], + [] + ] }, { "id": "27d9e5846a679b8b", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Turn off fan", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -21201,29 +21213,26 @@ "domain": "switch", "service": "turn_off", "x": 1510, - "y": 1120 + "y": 1120, + "wires": [ + [] + ] }, { "id": "4548a32796918fd8", "type": "comment", "z": "c7f876875da48b87", "name": "Bathroom ventilator automation shower", - "wires": [], "info": "", "x": 210, - "y": 1000 + "y": 1000, + "wires": [] }, { "id": "3d44cb85e182a197", "type": "server-state-changed", "z": "c7f876875da48b87", "name": "Bathroom fan turned on", - "wires": [ - [ - "7e4f4bb9c0c9ef2b" - ], - [] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -21270,24 +21279,19 @@ } ], "x": 160, - "y": 1120 + "y": 1120, + "wires": [ + [ + "7e4f4bb9c0c9ef2b" + ], + [] + ] }, { "id": "ebb5b8c2c3eb6ff5", "type": "server-state-changed", "z": "c7f876875da48b87", "name": "Bathroom motion sensor on", - "wires": [ - [ - "eab005bf8b682c46", - "a2887d07baac63d5", - "8ff99e0276ad242f" - ], - [ - "a2887d07baac63d5", - "8ff99e0276ad242f" - ] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -21334,18 +21338,24 @@ } ], "x": 180, - "y": 320 + "y": 320, + "wires": [ + [ + "eab005bf8b682c46", + "a2887d07baac63d5", + "8ff99e0276ad242f" + ], + [ + "a2887d07baac63d5", + "8ff99e0276ad242f" + ] + ] }, { "id": "cc46642a3ea04954", "type": "change", "z": "c7f876875da48b87", "name": "Scene Bathroom Bright", - "wires": [ - [ - "ed2d549e91e1399d" - ] - ], "rules": [ { "t": "set", @@ -21361,16 +21371,18 @@ "to": "", "reg": false, "x": 1010, - "y": 120 + "y": 120, + "wires": [ + [ + "ed2d549e91e1399d" + ] + ] }, { "id": "ed2d549e91e1399d", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Turn on Scene", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -21392,18 +21404,16 @@ "domain": "scene", "service": "turn_on", "x": 1560, - "y": 100 + "y": 100, + "wires": [ + [] + ] }, { "id": "1ae97faec6bec4ae", "type": "change", "z": "c7f876875da48b87", "name": "Scene Bathroom Evening", - "wires": [ - [ - "ed2d549e91e1399d" - ] - ], "rules": [ { "t": "set", @@ -21419,18 +21429,18 @@ "to": "", "reg": false, "x": 1010, - "y": 160 + "y": 160, + "wires": [ + [ + "ed2d549e91e1399d" + ] + ] }, { "id": "ddf62bacca5574f6", "type": "change", "z": "c7f876875da48b87", "name": "Scene Bathroom Night", - "wires": [ - [ - "ed2d549e91e1399d" - ] - ], "rules": [ { "t": "set", @@ -21446,16 +21456,18 @@ "to": "", "reg": false, "x": 1000, - "y": 200 + "y": 200, + "wires": [ + [ + "ed2d549e91e1399d" + ] + ] }, { "id": "3013e31f0b3d9303", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Execute effect on lights bathroom", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -21477,29 +21489,26 @@ "domain": "light", "service": "turn_on", "x": 1540, - "y": 440 + "y": 440, + "wires": [ + [] + ] }, { "id": "bdccd31c131b65fb", "type": "comment", "z": "c7f876875da48b87", "name": "Bathroom automated lights", - "wires": [], "info": "", "x": 170, - "y": 200 + "y": 200, + "wires": [] }, { "id": "a9f5122a5704e0e2", "type": "api-current-state", "z": "c7f876875da48b87", "name": "Noone bathing?", - "wires": [ - [ - "ff97c96955f8d423" - ], - [] - ], "server": "657c7463.48e1e4", "version": 3, "outputs": 2, @@ -21519,21 +21528,19 @@ "entity_location": "data", "override_data": "msg", "x": 1040, - "y": 340 + "y": 340, + "wires": [ + [ + "ff97c96955f8d423" + ], + [] + ] }, { "id": "38ff5b8ecfcbfdd0", "type": "server-state-changed", "z": "c7f876875da48b87", "name": "Bathmode turned on", - "wires": [ - [ - "20da8eedd69886b0" - ], - [ - "13c933aa7d791e63" - ] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -21580,18 +21587,21 @@ } ], "x": 150, - "y": 100 + "y": 100, + "wires": [ + [ + "20da8eedd69886b0" + ], + [ + "13c933aa7d791e63" + ] + ] }, { "id": "20da8eedd69886b0", "type": "change", "z": "c7f876875da48b87", "name": "Scene Bathroom Bath", - "wires": [ - [ - "ed2d549e91e1399d" - ] - ], "rules": [ { "t": "set", @@ -21607,29 +21617,28 @@ "to": "", "reg": false, "x": 1000, - "y": 80 + "y": 80, + "wires": [ + [ + "ed2d549e91e1399d" + ] + ] }, { "id": "b8f30c8224cf9d74", "type": "comment", "z": "c7f876875da48b87", "name": "Bathmode ", - "wires": [], "info": "", "x": 120, - "y": 60 + "y": 60, + "wires": [] }, { "id": "eab005bf8b682c46", "type": "api-current-state", "z": "c7f876875da48b87", "name": "Noone bathing?", - "wires": [ - [ - "13c933aa7d791e63" - ], - [] - ], "server": "657c7463.48e1e4", "version": 3, "outputs": 2, @@ -21649,16 +21658,19 @@ "entity_location": "data", "override_data": "msg", "x": 440, - "y": 220 + "y": 220, + "wires": [ + [ + "13c933aa7d791e63" + ], + [] + ] }, { "id": "97b500f5140c1dc1", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Turn off lights bathroom", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -21680,18 +21692,16 @@ "domain": "light", "service": "turn_off", "x": 1510, - "y": 380 + "y": 380, + "wires": [ + [] + ] }, { "id": "ce6d7cb10437a4ac", "type": "change", "z": "c7f876875da48b87", "name": "Store which delay", - "wires": [ - [ - "a9f5122a5704e0e2" - ] - ], "rules": [ { "t": "set", @@ -21707,21 +21717,18 @@ "to": "", "reg": false, "x": 830, - "y": 340 + "y": 340, + "wires": [ + [ + "a9f5122a5704e0e2" + ] + ] }, { "id": "ff97c96955f8d423", "type": "switch", "z": "c7f876875da48b87", "name": "5:00 or 4:30 min delay", - "wires": [ - [ - "97b500f5140c1dc1" - ], - [ - "173369324c7a842c" - ] - ], "property": "delay", "propertyType": "msg", "rules": [ @@ -21740,18 +21747,21 @@ "repair": false, "outputs": 2, "x": 840, - "y": 420 + "y": 420, + "wires": [ + [ + "97b500f5140c1dc1" + ], + [ + "173369324c7a842c" + ] + ] }, { "id": "cbba47369f1e6479", "type": "trigger", "z": "c7f876875da48b87", "name": "Wait 1:30 min", - "wires": [ - [ - "e12d8801b6c6f320" - ] - ], "op1": "", "op2": "90", "op1type": "nul", @@ -21765,18 +21775,18 @@ "topic": "topic", "outputs": 1, "x": 640, - "y": 660 + "y": 660, + "wires": [ + [ + "e12d8801b6c6f320" + ] + ] }, { "id": "580c3afd65deefed", "type": "trigger", "z": "c7f876875da48b87", "name": "Wait for 2:00 min", - "wires": [ - [ - "e12d8801b6c6f320" - ] - ], "op1": "", "op2": "120", "op1type": "nul", @@ -21790,18 +21800,18 @@ "topic": "topic", "outputs": 1, "x": 650, - "y": 620 + "y": 620, + "wires": [ + [ + "e12d8801b6c6f320" + ] + ] }, { "id": "26f9395831aa077c", "type": "change", "z": "c7f876875da48b87", "name": "Flash at brightness 100%", - "wires": [ - [ - "b1e7dd85582b7d3e" - ] - ], "rules": [ { "t": "set", @@ -21817,23 +21827,19 @@ "to": "", "reg": false, "x": 1270, - "y": 820 + "y": 820, + "wires": [ + [ + "b1e7dd85582b7d3e" + ] + ] }, { "id": "8f9be70d71578fba", "type": "server-state-changed", "z": "c7f876875da48b87", - "name": "Bathroom motion sensor on", - "wires": [ - [ - "580c3afd65deefed", - "cbba47369f1e6479" - ], - [ - "52af4ffdf85f60e4" - ] - ], "d": true, + "name": "Bathroom motion sensor on", "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -21880,16 +21886,22 @@ } ], "x": 180, - "y": 620 + "y": 620, + "wires": [ + [ + "580c3afd65deefed", + "cbba47369f1e6479" + ], + [ + "52af4ffdf85f60e4" + ] + ] }, { "id": "b1e7dd85582b7d3e", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Execute effect on lights bathroom", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -21911,19 +21923,16 @@ "domain": "light", "service": "turn_on", "x": 1580, - "y": 820 + "y": 820, + "wires": [ + [] + ] }, { "id": "07d4571f236fd04b", "type": "api-current-state", "z": "c7f876875da48b87", "name": "Noone bathing?", - "wires": [ - [ - "32e3e60ad0e0d9a1" - ], - [] - ], "server": "657c7463.48e1e4", "version": 3, "outputs": 2, @@ -21943,16 +21952,19 @@ "entity_location": "data", "override_data": "msg", "x": 1100, - "y": 640 + "y": 640, + "wires": [ + [ + "32e3e60ad0e0d9a1" + ], + [] + ] }, { "id": "a8ad8572dc926e44", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Turn off lights bathroom", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -21974,18 +21986,16 @@ "domain": "light", "service": "turn_off", "x": 1550, - "y": 760 + "y": 760, + "wires": [ + [] + ] }, { "id": "ade1222fab2ea469", "type": "inject", "z": "c7f876875da48b87", "name": "", - "wires": [ - [ - "32e3e60ad0e0d9a1" - ] - ], "props": [ { "p": "payload" @@ -22003,19 +22013,18 @@ "payload": "", "payloadType": "date", "x": 140, - "y": 740 + "y": 740, + "wires": [ + [ + "32e3e60ad0e0d9a1" + ] + ] }, { "id": "32e3e60ad0e0d9a1", "type": "api-current-state", "z": "c7f876875da48b87", "name": "Bathroom door closed?", - "wires": [ - [], - [ - "bbd7dc3adff7b866" - ] - ], "server": "657c7463.48e1e4", "version": 3, "outputs": 2, @@ -22048,19 +22057,19 @@ "entity_location": "data", "override_data": "msg", "x": 1350, - "y": 640 + "y": 640, + "wires": [ + [], + [ + "bbd7dc3adff7b866" + ] + ] }, { "id": "52af4ffdf85f60e4", "type": "change", "z": "c7f876875da48b87", "name": "Store motion off time", - "wires": [ - [ - "580c3afd65deefed", - "cbba47369f1e6479" - ] - ], "rules": [ { "t": "set", @@ -22076,18 +22085,19 @@ "to": "", "reg": false, "x": 400, - "y": 680 + "y": 680, + "wires": [ + [ + "580c3afd65deefed", + "cbba47369f1e6479" + ] + ] }, { "id": "e12d8801b6c6f320", "type": "change", "z": "c7f876875da48b87", "name": "Store which delay", - "wires": [ - [ - "07d4571f236fd04b" - ] - ], "rules": [ { "t": "set", @@ -22103,21 +22113,18 @@ "to": "", "reg": false, "x": 890, - "y": 640 + "y": 640, + "wires": [ + [ + "07d4571f236fd04b" + ] + ] }, { "id": "bbd7dc3adff7b866", "type": "switch", "z": "c7f876875da48b87", "name": "2:00 or 1:30 min delay", - "wires": [ - [ - "a8ad8572dc926e44" - ], - [ - "26f9395831aa077c" - ] - ], "property": "delay", "propertyType": "msg", "rules": [ @@ -22136,21 +22143,21 @@ "repair": false, "outputs": 2, "x": 940, - "y": 780 + "y": 780, + "wires": [ + [ + "a8ad8572dc926e44" + ], + [ + "26f9395831aa077c" + ] + ] }, { "id": "339b3b18887a2819", "type": "server-state-changed", "z": "c7f876875da48b87", "name": "Bathing mode on", - "wires": [ - [ - "f4a8732084a282d7" - ], - [ - "f4a8732084a282d7" - ] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 2, @@ -22197,18 +22204,21 @@ } ], "x": 140, - "y": 520 + "y": 520, + "wires": [ + [ + "f4a8732084a282d7" + ], + [ + "f4a8732084a282d7" + ] + ] }, { "id": "f4a8732084a282d7", "type": "trigger", "z": "c7f876875da48b87", "name": "Wait for 5 hours", - "wires": [ - [ - "4b98e17771cc3851" - ] - ], "op1": "", "op2": "", "op1type": "nul", @@ -22222,16 +22232,18 @@ "topic": "topic", "outputs": 1, "x": 600, - "y": 520 + "y": 520, + "wires": [ + [ + "4b98e17771cc3851" + ] + ] }, { "id": "4b98e17771cc3851", "type": "api-call-service", "z": "c7f876875da48b87", "name": "Turn off bath mode", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, @@ -22253,28 +22265,26 @@ "domain": "input_boolean", "service": "turn_off", "x": 850, - "y": 520 + "y": 520, + "wires": [ + [] + ] }, { "id": "bb74897476a1a5e6", "type": "comment", "z": "c7f876875da48b87", "name": "Automatic turn off bath mode after X hours", - "wires": [], "info": "", "x": 220, - "y": 480 + "y": 480, + "wires": [] }, { "id": "f1a2b3c4d5e60001", "type": "function", "z": "c7f876875da48b87", "name": "Rise >= 3% in 2 min?", - "wires": [ - [ - "b2a9a137a909e257" - ] - ], "func": "const readings = context.get(\"readings\") || [];\nconst lastTriggered = context.get(\"lastTriggered\") || 0;\nconst now = Date.now();\nconst current = parseFloat(msg.payload);\n\nif (isNaN(current)) return null;\n\n// 15-minute cooldown after triggering\nif (now - lastTriggered < 15 * 60 * 1000) return null;\n\nreadings.push({ time: now, value: current });\nconst windowMs = 2 * 60 * 1000;\nconst filtered = readings.filter(r => r.time >= now - windowMs);\ncontext.set(\"readings\", filtered);\n\nif (filtered.length < 2) return null;\n\nconst minInWindow = Math.min(...filtered.map(r => r.value));\nconst rise = current - minInWindow;\n\nif (rise >= 3) {\n context.set(\"lastTriggered\", now);\n context.set(\"readings\", []);\n flow.set(\"humidityBaseline\", minInWindow);\n return msg;\n}\nreturn null;", "outputs": 1, "timeout": 0, @@ -22283,21 +22293,18 @@ "finalize": "", "libs": [], "x": 460, - "y": 1040 + "y": 1040, + "wires": [ + [ + "b2a9a137a909e257" + ] + ] }, { "id": "d6e7f8a9b0c10002", "type": "function", "z": "c7f876875da48b87", "name": "Below baseline + 5%?", - "wires": [ - [ - "27d9e5846a679b8b" - ], - [ - "7e4f4bb9c0c9ef2b" - ] - ], "func": "const current = parseFloat(msg.payload);\nconst baseline = flow.get(\"humidityBaseline\") || 60;\nconst threshold = baseline + 5;\n\nif (current <= threshold) {\n return [msg, null];\n}\nreturn [null, msg];", "outputs": 2, "timeout": 0, @@ -22306,20 +22313,21 @@ "finalize": "", "libs": [], "x": 1240, - "y": 1120 + "y": 1120, + "wires": [ + [ + "27d9e5846a679b8b" + ], + [ + "7e4f4bb9c0c9ef2b" + ] + ] }, { "id": "bthrm_timebased_01", "type": "server-state-changed", "z": "c7f876875da48b87", "name": "Bathroom time-based turn on", - "wires": [ - [ - "13c933aa7d791e63", - "a2887d07baac63d5", - "8ff99e0276ad242f" - ] - ], "server": "657c7463.48e1e4", "version": 6, "outputs": 1, @@ -22366,18 +22374,20 @@ } ], "x": 180, - "y": 140 + "y": 140, + "wires": [ + [ + "13c933aa7d791e63", + "a2887d07baac63d5", + "8ff99e0276ad242f" + ] + ] }, { "id": "bath_br_state_01", "type": "api-current-state", "z": "c7f876875da48b87", "name": "Bedroom ceiling brightness", - "wires": [ - [ - "bath_br_switch_01" - ] - ], "server": "657c7463.48e1e4", "version": 3, "outputs": 1, @@ -22405,21 +22415,18 @@ "forType": "num", "forUnits": "minutes", "x": 830, - "y": 240 + "y": 240, + "wires": [ + [ + "bath_br_switch_01" + ] + ] }, { "id": "bath_br_switch_01", "type": "switch", "z": "c7f876875da48b87", "name": "Bedroom brightness > 50%?", - "wires": [ - [ - "1ae97faec6bec4ae" - ], - [ - "ddf62bacca5574f6" - ] - ], "property": "data.attributes.brightness", "propertyType": "msg", "rules": [ @@ -22436,25 +22443,24 @@ "repair": false, "outputs": 2, "x": 1080, - "y": 240 - }, - { - "type": "tab", - "label": "presence", - "id": "6dfa989bb120e6c6" + "y": 240, + "wires": [ + [ + "1ae97faec6bec4ae" + ], + [ + "ddf62bacca5574f6" + ] + ] }, { "id": "pres001a2b3c4d5e", "type": "server-state-changed", "z": "6dfa989bb120e6c6", "name": "Mischa presence", - "wires": [ - [ - "pres002a2b3c4d5e" - ] - ], "server": "657c7463.48e1e4", "version": 6, + "outputs": 1, "exposeAsEntityConfig": "", "entities": { "entity": [ @@ -22497,23 +22503,19 @@ "valueType": "triggerId" } ], - "outputs": 1, "x": 120, - "y": 100 + "y": 100, + "wires": [ + [ + "pres002a2b3c4d5e" + ] + ] }, { "id": "pres002a2b3c4d5e", "type": "switch", "z": "6dfa989bb120e6c6", "name": "Home or Away?", - "wires": [ - [ - "pres003a2b3c4d5e" - ], - [ - "pres004a2b3c4d5e" - ] - ], "property": "payload", "propertyType": "msg", "rules": [ @@ -22532,22 +22534,25 @@ "repair": false, "outputs": 2, "x": 360, - "y": 100 + "y": 100, + "wires": [ + [ + "pres003a2b3c4d5e" + ], + [ + "pres004a2b3c4d5e" + ] + ] }, { "id": "pres003a2b3c4d5e", "type": "api-call-service", "z": "6dfa989bb120e6c6", "name": "Set Home", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, "action": "input_select.select_option", - "domain": "input_select", - "service": "select_option", "floorId": [], "areaId": [], "deviceId": [], @@ -22562,23 +22567,23 @@ "outputProperties": [], "queue": "none", "blockInputOverrides": false, + "domain": "input_select", + "service": "select_option", "x": 580, - "y": 60 + "y": 60, + "wires": [ + [] + ] }, { "id": "pres004a2b3c4d5e", "type": "api-call-service", "z": "6dfa989bb120e6c6", "name": "Set Away", - "wires": [ - [] - ], "server": "657c7463.48e1e4", "version": 7, "debugenabled": false, "action": "input_select.select_option", - "domain": "input_select", - "service": "select_option", "floorId": [], "areaId": [], "deviceId": [], @@ -22593,7 +22598,12 @@ "outputProperties": [], "queue": "none", "blockInputOverrides": false, + "domain": "input_select", + "service": "select_option", "x": 580, - "y": 140 + "y": 140, + "wires": [ + [] + ] } ] \ No newline at end of file