From a5dbc359d268e865b9d8c3d87a110d9c3024a57c Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sat, 1 Mar 2025 02:59:39 -0500 Subject: [PATCH] Do Not Disturb light setting for Basement Studio tm24fan8/Home-Assistant-Configs#218 --- flows.json | 494 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 494 insertions(+) diff --git a/flows.json b/flows.json index 6508f71..0d3fd9e 100644 --- a/flows.json +++ b/flows.json @@ -2091,6 +2091,34 @@ "w": 612, "h": 262 }, + { + "id": "d70533ec9ef234f6", + "type": "group", + "z": "47f17992fab9b4f5", + "name": "Do Not Enter", + "style": { + "label": true + }, + "nodes": [ + "b62ba31a1b35ef47", + "e8b5f4ace78d485a", + "d7b73ee4a2387bfa", + "6e5bbaefb1d2c14e", + "117e6e67bd4c2794", + "efa4a1761da0b38d", + "6d1291b96a8c9e83", + "b8648d760ccc1aa2", + "e8097cd64b17370a", + "9d5f6c64408c0b6a", + "21496cb5b59bf2fb", + "be40ebfb2514fdb2", + "724968ddc9702720" + ], + "x": 34, + "y": 1319, + "w": 1212, + "h": 302 + }, { "id": "fba69dfc80829db7", "type": "junction", @@ -16678,6 +16706,472 @@ "icon": "font-awesome/fa-moon-o", "l": false }, + { + "id": "b62ba31a1b35ef47", + "type": "server-state-changed", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Do Not Enter", + "server": "9e87348d.9c1c48", + "version": 6, + "outputs": 2, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_boolean.do_not_enter_basement_studio" + ], + "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": "", + "valueType": "entityState" + }, + { + "property": "topic", + "propertyType": "msg", + "value": "dnd", + "valueType": "str" + } + ], + "x": 130, + "y": 1400, + "wires": [ + [ + "6e5bbaefb1d2c14e", + "117e6e67bd4c2794", + "e8b5f4ace78d485a" + ], + [ + "6e5bbaefb1d2c14e", + "117e6e67bd4c2794", + "efa4a1761da0b38d" + ] + ], + "outputLabels": [ + "On", + "Off" + ] + }, + { + "id": "e8b5f4ace78d485a", + "type": "api-call-service", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Manual Control", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "adaptive_lighting.set_manual_control", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{\t \"entity_id\":\"switch.adaptive_lighting_basement_studio\",\t \"lights\": [\t \"light.basement_stairwell\"\t ],\t \"manual_control\":\"true\"\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "adaptive_lighting", + "service": "set_manual_control", + "x": 520, + "y": 1400, + "wires": [ + [ + "d7b73ee4a2387bfa" + ] + ] + }, + { + "id": "d7b73ee4a2387bfa", + "type": "api-call-service", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Set light to red", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "light.turn_on", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "light.basement_stairwell" + ], + "labelId": [], + "data": "{\t \"brightness_pct\": 100,\t \"rgb_color\": [255,0,0]\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "light", + "service": "turn_on", + "x": 720, + "y": 1400, + "wires": [ + [] + ] + }, + { + "id": "6e5bbaefb1d2c14e", + "type": "change", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "", + "rules": [ + { + "t": "set", + "p": "dnd", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 510, + "y": 1520, + "wires": [ + [] + ] + }, + { + "id": "117e6e67bd4c2794", + "type": "mqtt out", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "", + "topic": "house/studio/dnd", + "qos": "2", + "retain": "true", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "fd29421fc00140a8", + "x": 530, + "y": 1580, + "wires": [] + }, + { + "id": "efa4a1761da0b38d", + "type": "api-call-service", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Manual Control", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "adaptive_lighting.set_manual_control", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{\t \"entity_id\":\"switch.adaptive_lighting_basement_studio\",\t \"lights\": [\t \"light.basement_stairwell\"\t ],\t \"manual_control\":\"false\"\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "adaptive_lighting", + "service": "set_manual_control", + "x": 520, + "y": 1460, + "wires": [ + [ + "6d1291b96a8c9e83" + ] + ] + }, + { + "id": "6d1291b96a8c9e83", + "type": "api-current-state", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Selected Scene", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "Adaptive", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_text.basement_studio_selected_scene", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "scene", + "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": 720, + "y": 1460, + "wires": [ + [ + "b8648d760ccc1aa2" + ], + [ + "9d5f6c64408c0b6a" + ] + ], + "outputLabels": [ + "Adaptive", + "Else" + ] + }, + { + "id": "b8648d760ccc1aa2", + "type": "api-call-service", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Apply Adaptive", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "adaptive_lighting.apply", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{\t \"entity_id\":\"switch.adaptive_lighting_basement_studio\",\t \"lights\": [\t \"light.basement_stairwell\"\t ],\t \"adapt_brightness\":true,\t \"adapt_color\":true\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "adaptive_lighting", + "service": "apply", + "x": 940, + "y": 1440, + "wires": [ + [] + ] + }, + { + "id": "e8097cd64b17370a", + "type": "api-call-service", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Re-apply scene", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "input_select.select_option", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [ + "input_select.basement_studio_scenes" + ], + "labelId": [], + "data": "{\t \"option\": scene\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "input_select", + "service": "select_option", + "x": 1140, + "y": 1500, + "wires": [ + [] + ] + }, + { + "id": "9d5f6c64408c0b6a", + "type": "api-call-service", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Apply Adaptive", + "server": "9e87348d.9c1c48", + "version": 7, + "debugenabled": false, + "action": "adaptive_lighting.apply", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{\t \"entity_id\":\"switch.adaptive_lighting_basement_studio\",\t \"lights\": [\t \"light.basement_stairwell\"\t ],\t \"adapt_brightness\":true,\t \"adapt_color\":true\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": true, + "domain": "adaptive_lighting", + "service": "apply", + "x": 940, + "y": 1500, + "wires": [ + [ + "e8097cd64b17370a" + ] + ] + }, + { + "id": "21496cb5b59bf2fb", + "type": "server-state-changed", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "Scene Changed", + "server": "9e87348d.9c1c48", + "version": 6, + "outputs": 2, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_select.basement_studio_scenes" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "Select", + "ifStateType": "str", + "ifStateOperator": "is_not", + "outputOnlyOnStateChange": true, + "for": "0", + "forType": "num", + "forUnits": "minutes", + "ignorePrevStateNull": false, + "ignorePrevStateUnknown": false, + "ignorePrevStateUnavailable": false, + "ignoreCurrentStateUnknown": true, + "ignoreCurrentStateUnavailable": true, + "outputProperties": [ + { + "property": "scene", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + } + ], + "x": 140, + "y": 1460, + "wires": [ + [ + "be40ebfb2514fdb2" + ], + [] + ] + }, + { + "id": "be40ebfb2514fdb2", + "type": "api-current-state", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "DND", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "on", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_boolean.do_not_enter_basement_studio", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "dnd", + "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": 305, + "y": 1360, + "wires": [ + [ + "724968ddc9702720" + ], + [] + ], + "outputLabels": [ + "On", + "Off" + ], + "icon": "font-awesome/fa-warning", + "l": false + }, + { + "id": "724968ddc9702720", + "type": "delay", + "z": "47f17992fab9b4f5", + "g": "d70533ec9ef234f6", + "name": "", + "pauseType": "delay", + "timeout": "2", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 375, + "y": 1360, + "wires": [ + [ + "e8b5f4ace78d485a" + ] + ], + "l": false + }, { "id": "091390f43bfeddf5", "type": "api-call-service",