From abdc75f7e8b34fdf5fab333e6f5f116c15d35f39 Mon Sep 17 00:00:00 2001 From: m038 Date: Thu, 28 May 2026 22:10:22 +0200 Subject: [PATCH] Update flow files --- flows.json | 2004 ++++++++++++++++++++++++++-------------------------- 1 file changed, 1002 insertions(+), 1002 deletions(-) diff --git a/flows.json b/flows.json index 6f76041..99e3f73 100644 --- a/flows.json +++ b/flows.json @@ -53,11 +53,6 @@ "type": "tab", "label": "Balcony" }, - { - "id": "c19dee9f.e72838", - "type": "tab", - "label": "Hallway" - }, { "id": "1f4d4622.7490ca", "type": "tab", @@ -11771,1003 +11766,6 @@ [] ] }, - { - "id": "1be4d360986fd1f1", - "type": "server-state-changed", - "z": "c19dee9f.e72838", - "name": "Hallway smart switch", - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "sensor.hallway_switch_action" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "ifStateType": "str", - "ifStateOperator": "is", - "outputOnlyOnStateChange": true, - "for": 0, - "forType": "num", - "forUnits": "minutes", - "ignorePrevStateNull": false, - "ignorePrevStateUnknown": false, - "ignorePrevStateUnavailable": false, - "ignoreCurrentStateUnknown": false, - "ignoreCurrentStateUnavailable": false, - "outputProperties": [ - { - "property": "payload", - "propertyType": "msg", - "value": "string", - "valueType": "entityState" - }, - { - "property": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 160, - "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", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on_press_release", - "vt": "str" - }, - { - "t": "eq", - "v": "off_press_release", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 470, - "y": 220, - "wires": [ - [ - "3369429b11ec6c87" - ], - [ - "492a8c0fafdb95c0" - ] - ] - }, - { - "id": "93521b5966f6fca9", - "type": "comment", - "z": "c19dee9f.e72838", - "name": "Hallway Lights on/off switch", - "info": "", - "x": 180, - "y": 80, - "wires": [] - }, - { - "id": "28b5f90c956f8589", - "type": "api-call-service", - "z": "c19dee9f.e72838", - "name": "Turn on/off lights hallway", - "server": "657c7463.48e1e4", - "version": 7, - "debugenabled": false, - "action": "light.turn_on", - "floorId": [], - "areaId": [ - "b156eada202a4a3381ef6ffa674f5ebc" - ], - "deviceId": [], - "entityId": [], - "labelId": [], - "data": "{{{payload}}}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "blockInputOverrides": false, - "domain": "light", - "service": "turn_on", - "x": 1790, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "3369429b11ec6c87", - "type": "subflow:52430f5e9f9ee267", - "z": "c19dee9f.e72838", - "name": "", - "x": 890, - "y": 280, - "wires": [ - [ - "9e21108d47dd29fe" - ], - [ - "9e21108d47dd29fe" - ], - [ - "da8f36cbc0df2e8c" - ], - [ - "da8f36cbc0df2e8c" - ], - [ - "hllw_br_state_01" - ], - [ - "hllw_br_state_01" - ] - ] - }, - { - "id": "c2c1acbc73dc80f4", - "type": "comment", - "z": "c19dee9f.e72838", - "name": "Hallway Motion sensor", - "info": "", - "x": 160, - "y": 480, - "wires": [] - }, - { - "id": "c4a4ba3c5f68d440", - "type": "server-state-changed", - "z": "c19dee9f.e72838", - "name": "Hallway motion sensor", - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 2, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "binary_sensor.hallway_motion_sensor_1_occupancy", - "binary_sensor.hallway_motion_sensor_2_occupancy", - "binary_sensor.hallway_motion_sensor_3_occupancy" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "on", - "ifStateType": "str", - "ifStateOperator": "is", - "outputOnlyOnStateChange": true, - "for": 0, - "forType": "num", - "forUnits": "minutes", - "ignorePrevStateNull": false, - "ignorePrevStateUnknown": false, - "ignorePrevStateUnavailable": false, - "ignoreCurrentStateUnknown": false, - "ignoreCurrentStateUnavailable": false, - "outputProperties": [ - { - "property": "payload", - "propertyType": "msg", - "value": "string", - "valueType": "entityState" - }, - { - "property": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "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", - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "input_button.hallway_time_based_turn_on" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "ifStateType": "str", - "ifStateOperator": "is", - "outputOnlyOnStateChange": true, - "for": 0, - "forType": "num", - "forUnits": "minutes", - "ignorePrevStateNull": false, - "ignorePrevStateUnknown": false, - "ignorePrevStateUnavailable": false, - "ignoreCurrentStateUnknown": false, - "ignoreCurrentStateUnavailable": false, - "outputProperties": [ - { - "property": "payload", - "propertyType": "msg", - "value": "string", - "valueType": "entityState" - }, - { - "property": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 180, - "y": 580, - "wires": [ - [ - "3369429b11ec6c87", - "4b6861fef07dcf9c", - "cb510a92532ea7f5" - ] - ] - }, - { - "id": "492a8c0fafdb95c0", - "type": "change", - "z": "c19dee9f.e72838", - "name": "Brightness to 0 (turn off)", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness\":0}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1350, - "y": 560, - "wires": [ - [ - "28b5f90c956f8589" - ] - ] - }, - { - "id": "dcd933bc4929181e", - "type": "change", - "z": "c19dee9f.e72838", - "name": "Brightness to 20%", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":20}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1310, - "y": 280, - "wires": [ - [ - "28b5f90c956f8589" - ] - ] - }, - { - "id": "9e21108d47dd29fe", - "type": "change", - "z": "c19dee9f.e72838", - "name": "Brightness to 100%", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":100}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1310, - "y": 200, - "wires": [ - [ - "28b5f90c956f8589" - ] - ] - }, - { - "id": "da8f36cbc0df2e8c", - "type": "change", - "z": "c19dee9f.e72838", - "name": "Brightness to 65%", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":65}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1310, - "y": 240, - "wires": [ - [ - "28b5f90c956f8589" - ] - ] - }, - { - "id": "1e4d5008dcd7fb69", - "type": "change", - "z": "c19dee9f.e72838", - "name": "Flash at brightness 100%", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":100,\"flash\":\"short\"}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1350, - "y": 600, - "wires": [ - [ - "28b5f90c956f8589" - ] - ] - }, - { - "id": "4b6861fef07dcf9c", - "type": "trigger", - "z": "c19dee9f.e72838", - "name": "Trigger 4:30min for flash", - "op1": "", - "op2": "offf", - "op1type": "nul", - "op2type": "str", - "duration": "270", - "extend": true, - "overrideDelay": false, - "units": "s", - "reset": "", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 710, - "y": 560, - "wires": [ - [ - "1e4d5008dcd7fb69" - ] - ] - }, - { - "id": "cb510a92532ea7f5", - "type": "trigger", - "z": "c19dee9f.e72838", - "name": "Trigger 5:00 min for off", - "op1": "", - "op2": "offf", - "op1type": "nul", - "op2type": "str", - "duration": "300", - "extend": true, - "overrideDelay": false, - "units": "s", - "reset": "", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 700, - "y": 520, - "wires": [ - [ - "492a8c0fafdb95c0" - ] - ] - }, - { - "id": "hllw_sw_onhold_01", - "type": "switch", - "z": "c19dee9f.e72838", - "name": "On hold", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on_hold", - "vt": "str" - }, - { - "t": "eq", - "v": "off_hold", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 460, - "y": 140, - "wires": [ - [ - "9e21108d47dd29fe" - ], - [ - "dcd933bc4929181e" - ] - ] - }, - { - "id": "hllw_sw_brup_01", - "type": "switch", - "z": "c19dee9f.e72838", - "name": "Brightness check - Up press/hold", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "up_press", - "vt": "str" - }, - { - "t": "eq", - "v": "up_hold", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 540, - "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", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "down_press", - "vt": "str" - }, - { - "t": "eq", - "v": "down_hold", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 540, - "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)", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_step\":15,\"transition\":0.8}", - "tot": "json" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1320, - "y": 60, - "wires": [ - [ - "28b5f90c956f8589" - ] - ] - }, - { - "id": "hllw_sw_dec_01", - "type": "change", - "z": "c19dee9f.e72838", - "name": "Brightness decrease (smooth)", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_step\":-15,\"transition\":0.8}", - "tot": "json" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1330, - "y": 100, - "wires": [ - [ - "28b5f90c956f8589" - ] - ] - }, - { - "id": "hllw_sw_dbg_01", - "type": "debug", - "z": "c19dee9f.e72838", - "name": "Hallway Switch Debug", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 180, - "y": 200, - "wires": [] - }, - { - "id": "hllw_goodbye_comment_01", - "type": "comment", - "z": "c19dee9f.e72838", - "name": "Goodbye button", - "info": "", - "x": 140, - "y": 660, - "wires": [] - }, - { - "id": "hllw_goodbye_trigger_01", - "type": "server-state-changed", - "z": "c19dee9f.e72838", - "name": "Goodbye button", - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "sensor.goodbye_button_action" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "ifStateType": "str", - "ifStateOperator": "is", - "outputOnlyOnStateChange": true, - "for": 0, - "forType": "num", - "forUnits": "minutes", - "ignorePrevStateNull": false, - "ignorePrevStateUnknown": false, - "ignorePrevStateUnavailable": false, - "ignoreCurrentStateUnknown": false, - "ignoreCurrentStateUnavailable": false, - "outputProperties": [ - { - "property": "payload", - "propertyType": "msg", - "value": "", - "valueType": "entityState" - }, - { - "property": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "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", - "server": "657c7463.48e1e4", - "version": 7, - "debugenabled": false, - "action": "switch.turn_off", - "floorId": [], - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.espresso_kitchen" - ], - "labelId": [], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "blockInputOverrides": false, - "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", - "server": "657c7463.48e1e4", - "version": 7, - "debugenabled": false, - "action": "remote.turn_off", - "floorId": [], - "areaId": [], - "deviceId": [], - "entityId": [ - "remote.living_room" - ], - "labelId": [], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "blockInputOverrides": false, - "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", - "server": "657c7463.48e1e4", - "version": 7, - "debugenabled": false, - "action": "media_player.media_pause", - "floorId": [], - "areaId": [], - "deviceId": [], - "entityId": [ - "media_player.bathroom", - "media_player.bedroom", - "media_player.kitchen" - ], - "labelId": [], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "blockInputOverrides": false, - "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)", - "server": "657c7463.48e1e4", - "version": 7, - "debugenabled": false, - "action": "light.turn_off", - "floorId": [], - "areaId": [], - "deviceId": [], - "entityId": [ - "light.living_room", - "light.bedroom", - "light.bathroom" - ], - "labelId": [], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "blockInputOverrides": false, - "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", - "server": "657c7463.48e1e4", - "version": 3, - "outputs": 1, - "halt_if": "", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "light.bedroom_main", - "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", - "x": 1340, - "y": 400, - "wires": [ - [ - "hllw_br_switch_01" - ] - ] - }, - { - "id": "hllw_br_switch_01", - "type": "switch", - "z": "c19dee9f.e72838", - "name": "Bedroom brightness > 50%?", - "property": "data.attributes.brightness", - "propertyType": "msg", - "rules": [ - { - "t": "gt", - "v": "128", - "vt": "num" - }, - { - "t": "else" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1340, - "y": 440, - "wires": [ - [ - "da8f36cbc0df2e8c" - ], - [ - "dcd933bc4929181e" - ] - ] - }, - { - "id": "d62ce1b52df12205", - "type": "comment", - "z": "c19dee9f.e72838", - "name": "When bedroom is lit - use more brightness", - "info": "", - "x": 1380, - "y": 360, - "wires": [] - }, - { - "id": "p2catch_hal", - "type": "catch", - "z": "c19dee9f.e72838", - "name": "Catch all errors", - "scope": null, - "uncaught": false, - "x": 160, - "y": 1020, - "wires": [ - [ - "p2fmt_hal" - ] - ] - }, - { - "id": "p2fmt_hal", - "type": "function", - "z": "c19dee9f.e72838", - "name": "Format error", - "func": "const err = (msg.error && msg.error.message) ? msg.error.message : String(msg.payload || 'Unknown error');\nconst src = (msg.error && msg.error.source) ? (msg.error.source.name || msg.error.source.id || '') : '';\nmsg.payload = JSON.stringify({\n title: 'Node-RED Error: Hallway',\n message: err + (src ? '\\n\\nNode: ' + src : '')\n});\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 400, - "y": 1020, - "wires": [ - [ - "p2ntfy_hal" - ] - ] - }, - { - "id": "p2ntfy_hal", - "type": "api-call-service", - "z": "c19dee9f.e72838", - "name": "Notify error", - "server": "657c7463.48e1e4", - "version": 7, - "debugenabled": false, - "action": "notify.gotify_ha", - "floorId": [], - "areaId": [], - "deviceId": [], - "entityId": [], - "labelId": [], - "data": "{{{payload}}}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "blockInputOverrides": false, - "domain": "notify", - "service": "gotify_ha", - "output_location": "", - "output_location_type": "none", - "x": 660, - "y": 1020, - "wires": [ - [] - ] - }, { "id": "eb217ba8.833d48", "type": "server-state-changed", @@ -21769,5 +20767,1007 @@ "willMsg": {}, "userProps": "", "sessionExpiry": "" + }, + { + "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, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "sensor.hallway_switch_action" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": 0, + "forType": "num", + "forUnits": "minutes", + "ignorePrevStateNull": false, + "ignorePrevStateUnknown": false, + "ignorePrevStateUnavailable": false, + "ignoreCurrentStateUnknown": false, + "ignoreCurrentStateUnavailable": false, + "outputProperties": [ + { + "property": "payload", + "propertyType": "msg", + "value": "string", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "eventData" + }, + { + "property": "topic", + "propertyType": "msg", + "value": "", + "valueType": "triggerId" + } + ], + "x": 160, + "y": 120 + }, + { + "id": "9bea73aa40198378", + "type": "switch", + "z": "c19dee9f.e72838", + "name": "On/Off check", + "wires": [ + [ + "3369429b11ec6c87" + ], + [ + "492a8c0fafdb95c0" + ] + ], + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "on_press_release", + "vt": "str" + }, + { + "t": "eq", + "v": "off_press_release", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 470, + "y": 220 + }, + { + "id": "93521b5966f6fca9", + "type": "comment", + "z": "c19dee9f.e72838", + "name": "Hallway Lights on/off switch", + "wires": [], + "info": "", + "x": 180, + "y": 80 + }, + { + "id": "28b5f90c956f8589", + "type": "api-call-service", + "z": "c19dee9f.e72838", + "name": "Turn on/off lights hallway", + "wires": [ + [] + ], + "server": "657c7463.48e1e4", + "version": 7, + "debugenabled": false, + "action": "light.turn_on", + "floorId": [], + "areaId": [ + "b156eada202a4a3381ef6ffa674f5ebc" + ], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{{{payload}}}", + "dataType": "json", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "light", + "service": "turn_on", + "x": 1790, + "y": 260 + }, + { + "id": "3369429b11ec6c87", + "type": "subflow:52430f5e9f9ee267", + "z": "c19dee9f.e72838", + "name": "", + "wires": [ + [ + "9e21108d47dd29fe" + ], + [ + "9e21108d47dd29fe" + ], + [ + "da8f36cbc0df2e8c" + ], + [ + "da8f36cbc0df2e8c" + ], + [ + "hllw_br_state_01" + ], + [ + "hllw_br_state_01" + ] + ], + "x": 890, + "y": 280 + }, + { + "id": "c2c1acbc73dc80f4", + "type": "comment", + "z": "c19dee9f.e72838", + "name": "Hallway Motion sensor", + "wires": [], + "info": "", + "x": 160, + "y": 480 + }, + { + "id": "c4a4ba3c5f68d440", + "type": "server-state-changed", + "z": "c19dee9f.e72838", + "name": "Hallway motion sensor", + "wires": [ + [ + "3369429b11ec6c87", + "4b6861fef07dcf9c", + "cb510a92532ea7f5" + ], + [] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 2, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "binary_sensor.hallway_motion_sensor_1_occupancy", + "binary_sensor.hallway_motion_sensor_2_occupancy", + "binary_sensor.hallway_motion_sensor_3_occupancy" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "on", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": 0, + "forType": "num", + "forUnits": "minutes", + "ignorePrevStateNull": false, + "ignorePrevStateUnknown": false, + "ignorePrevStateUnavailable": false, + "ignoreCurrentStateUnknown": false, + "ignoreCurrentStateUnavailable": false, + "outputProperties": [ + { + "property": "payload", + "propertyType": "msg", + "value": "string", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "eventData" + }, + { + "property": "topic", + "propertyType": "msg", + "value": "", + "valueType": "triggerId" + } + ], + "x": 160, + "y": 520 + }, + { + "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, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_button.hallway_time_based_turn_on" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": 0, + "forType": "num", + "forUnits": "minutes", + "ignorePrevStateNull": false, + "ignorePrevStateUnknown": false, + "ignorePrevStateUnavailable": false, + "ignoreCurrentStateUnknown": false, + "ignoreCurrentStateUnavailable": false, + "outputProperties": [ + { + "property": "payload", + "propertyType": "msg", + "value": "string", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "eventData" + }, + { + "property": "topic", + "propertyType": "msg", + "value": "", + "valueType": "triggerId" + } + ], + "x": 180, + "y": 580 + }, + { + "id": "492a8c0fafdb95c0", + "type": "change", + "z": "c19dee9f.e72838", + "name": "Brightness to 0 (turn off)", + "wires": [ + [ + "28b5f90c956f8589" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness\":0}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1350, + "y": 560 + }, + { + "id": "dcd933bc4929181e", + "type": "change", + "z": "c19dee9f.e72838", + "name": "Brightness to 20%", + "wires": [ + [ + "28b5f90c956f8589" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":20}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1310, + "y": 280 + }, + { + "id": "9e21108d47dd29fe", + "type": "change", + "z": "c19dee9f.e72838", + "name": "Brightness to 100%", + "wires": [ + [ + "28b5f90c956f8589" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":100}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1310, + "y": 200 + }, + { + "id": "da8f36cbc0df2e8c", + "type": "change", + "z": "c19dee9f.e72838", + "name": "Brightness to 65%", + "wires": [ + [ + "28b5f90c956f8589" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":65}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1310, + "y": 240 + }, + { + "id": "1e4d5008dcd7fb69", + "type": "change", + "z": "c19dee9f.e72838", + "name": "Flash at brightness 100%", + "wires": [ + [ + "28b5f90c956f8589" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":100,\"flash\":\"short\"}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1350, + "y": 600 + }, + { + "id": "4b6861fef07dcf9c", + "type": "trigger", + "z": "c19dee9f.e72838", + "name": "Trigger 4:30min for flash", + "wires": [ + [ + "1e4d5008dcd7fb69" + ] + ], + "op1": "", + "op2": "offf", + "op1type": "nul", + "op2type": "str", + "duration": "270", + "extend": true, + "overrideDelay": false, + "units": "s", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 710, + "y": 560 + }, + { + "id": "cb510a92532ea7f5", + "type": "trigger", + "z": "c19dee9f.e72838", + "name": "Trigger 5:00 min for off", + "wires": [ + [ + "492a8c0fafdb95c0" + ] + ], + "op1": "", + "op2": "offf", + "op1type": "nul", + "op2type": "str", + "duration": "300", + "extend": true, + "overrideDelay": false, + "units": "s", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 700, + "y": 520 + }, + { + "id": "hllw_sw_onhold_01", + "type": "switch", + "z": "c19dee9f.e72838", + "name": "On hold", + "wires": [ + [ + "9e21108d47dd29fe" + ], + [ + "dcd933bc4929181e" + ] + ], + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "on_hold", + "vt": "str" + }, + { + "t": "eq", + "v": "off_hold", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 460, + "y": 140 + }, + { + "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": [ + { + "t": "eq", + "v": "up_press", + "vt": "str" + }, + { + "t": "eq", + "v": "up_hold", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 540, + "y": 60 + }, + { + "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": [ + { + "t": "eq", + "v": "down_press", + "vt": "str" + }, + { + "t": "eq", + "v": "down_hold", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 540, + "y": 100 + }, + { + "id": "hllw_sw_inc_01", + "type": "change", + "z": "c19dee9f.e72838", + "name": "Brightness increase (smooth)", + "wires": [ + [ + "28b5f90c956f8589" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_step\":15,\"transition\":0.8}", + "tot": "json" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1320, + "y": 60 + }, + { + "id": "hllw_sw_dec_01", + "type": "change", + "z": "c19dee9f.e72838", + "name": "Brightness decrease (smooth)", + "wires": [ + [ + "28b5f90c956f8589" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_step\":-15,\"transition\":0.8}", + "tot": "json" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1330, + "y": 100 + }, + { + "id": "hllw_sw_dbg_01", + "type": "debug", + "z": "c19dee9f.e72838", + "name": "Hallway Switch Debug", + "wires": [], + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 180, + "y": 200 + }, + { + "id": "hllw_goodbye_comment_01", + "type": "comment", + "z": "c19dee9f.e72838", + "name": "Goodbye button", + "wires": [], + "info": "", + "x": 140, + "y": 660 + }, + { + "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, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "sensor.goodbye_button_action" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": 0, + "forType": "num", + "forUnits": "minutes", + "ignorePrevStateNull": false, + "ignorePrevStateUnknown": false, + "ignorePrevStateUnavailable": false, + "ignoreCurrentStateUnknown": false, + "ignoreCurrentStateUnavailable": false, + "outputProperties": [ + { + "property": "payload", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "eventData" + }, + { + "property": "topic", + "propertyType": "msg", + "value": "", + "valueType": "triggerId" + } + ], + "x": 140, + "y": 700 + }, + { + "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", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "switch.espresso_kitchen" + ], + "labelId": [], + "data": "", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "switch", + "service": "turn_off", + "x": 510, + "y": 700 + }, + { + "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", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "remote.living_room" + ], + "labelId": [], + "data": "", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "remote", + "service": "turn_off", + "x": 510, + "y": 740 + }, + { + "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", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "media_player.bathroom", + "media_player.bedroom", + "media_player.kitchen" + ], + "labelId": [], + "data": "", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "media_player", + "service": "media_pause", + "x": 510, + "y": 780 + }, + { + "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", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "light.living_room", + "light.bedroom", + "light.bathroom" + ], + "labelId": [], + "data": "", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "light", + "service": "turn_off", + "x": 550, + "y": 820 + }, + { + "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, + "halt_if": "", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "light.bedroom_main", + "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", + "x": 1340, + "y": 400 + }, + { + "id": "hllw_br_switch_01", + "type": "switch", + "z": "c19dee9f.e72838", + "name": "Bedroom brightness > 50%?", + "wires": [ + [ + "da8f36cbc0df2e8c" + ], + [ + "dcd933bc4929181e" + ] + ], + "property": "data.attributes.brightness", + "propertyType": "msg", + "rules": [ + { + "t": "gt", + "v": "128", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 1340, + "y": 440 + }, + { + "id": "d62ce1b52df12205", + "type": "comment", + "z": "c19dee9f.e72838", + "name": "When bedroom is lit - use more brightness", + "wires": [], + "info": "", + "x": 1380, + "y": 360 + }, + { + "id": "p2catch_hal", + "type": "catch", + "z": "c19dee9f.e72838", + "name": "Catch all errors", + "wires": [ + [ + "p2fmt_hal" + ] + ], + "scope": null, + "uncaught": false, + "x": 160, + "y": 1020 + }, + { + "id": "p2fmt_hal", + "type": "function", + "z": "c19dee9f.e72838", + "name": "Format error", + "wires": [ + [ + "p2ntfy_hal" + ] + ], + "func": "const err = (msg.error && msg.error.message) ? msg.error.message : String(msg.payload || 'Unknown error');\nconst src = (msg.error && msg.error.source) ? (msg.error.source.name || msg.error.source.id || '') : '';\nmsg.payload = JSON.stringify({\n title: 'Node-RED Error: Hallway',\n message: err + (src ? '\\n\\nNode: ' + src : '')\n});\nreturn msg;", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 400, + "y": 1020 + }, + { + "id": "p2ntfy_hal", + "type": "api-call-service", + "z": "c19dee9f.e72838", + "name": "Notify error", + "wires": [ + [] + ], + "server": "657c7463.48e1e4", + "version": 7, + "debugenabled": false, + "action": "notify.gotify_ha", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{{{payload}}}", + "dataType": "json", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "notify", + "service": "gotify_ha", + "output_location": "", + "output_location_type": "none", + "x": 660, + "y": 1020 } ] \ No newline at end of file