From c50cb2d4d0305fadd1d337b7c5e7292aee2e5bdc Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sat, 24 Dec 2022 15:36:11 -0500 Subject: [PATCH] Set desk scene if lights are on when sunset lights flow runs --- flows.json | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/flows.json b/flows.json index 7967f1e..7d503ee 100644 --- a/flows.json +++ b/flows.json @@ -7116,7 +7116,8 @@ [ "db751091895c18b8", "4449d5ec66482683", - "65a3169bc9301a4d" + "65a3169bc9301a4d", + "d0cac72a2cc0d7a7" ] ] }, @@ -8618,6 +8619,72 @@ [] ] }, + { + "id": "d0cac72a2cc0d7a7", + "type": "api-current-state", + "z": "e44b1e7a8ef7ae1d", + "name": "Desk Lights On?", + "server": "9e87348d.9c1c48", + "version": 3, + "outputs": 2, + "halt_if": "on", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "light.tina_desk_lights", + "state_type": "str", + "blockInputOverrides": false, + "outputProperties": [ + { + "property": "payload", + "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": 2330, + "y": 60, + "wires": [ + [ + "7c3feabba66ced30" + ], + [] + ] + }, + { + "id": "7c3feabba66ced30", + "type": "api-call-service", + "z": "e44b1e7a8ef7ae1d", + "name": "Reset Desk Scene", + "server": "9e87348d.9c1c48", + "version": 5, + "debugenabled": false, + "domain": "input_select", + "service": "select_option", + "areaId": [], + "deviceId": [], + "entityId": [ + "input_select.tina_desk_scenes" + ], + "data": "{\t \"option\":\"Reset\"\t}", + "dataType": "jsonata", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "x": 2550, + "y": 60, + "wires": [ + [] + ] + }, { "id": "134433d6e21dab5b", "type": "server-state-changed",