From 5ad0e5adc15f343e5aa5214d1ba7b6d3382ef680 Mon Sep 17 00:00:00 2001 From: guimatheus92 Date: Mon, 8 Jul 2024 21:51:19 -0300 Subject: [PATCH] feat: v1.2 --- .github/ISSUE_TEMPLATE/bug_report.md | 24 + .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 20 + .github/ISSUE_TEMPLATE/general_question.md | 14 + .github/workflows/ci.yml | 29 + .gitignore | 3 + node_red_flow.json | 8604 -------------------- requirements.txt | 4 +- tests/unit_tests/test_functions.py | 69 + 9 files changed, 162 insertions(+), 8606 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/general_question.md create mode 100644 .github/workflows/ci.yml delete mode 100644 node_red_flow.json create mode 100644 tests/unit_tests/test_functions.py diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..40906af --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,24 @@ +--- +name: :bug: Bug report +about: Create a report to help us improve +title: '[bug]: ' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..5401ea4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: :bulb: Feature request +about: Suggest an idea for this project +title: '[feat]: ' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/general_question.md b/.github/ISSUE_TEMPLATE/general_question.md new file mode 100644 index 0000000..70281cc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general_question.md @@ -0,0 +1,14 @@ +--- +name: :open_book: General question +about: Ask a question regarding this project +title: '[q&a]: ' +labels: question +assignees: '' + +--- + +**Question** +A clear and concise question. Ex. How do I [...]? + +**Additional context** +Add any other context or screenshots about the question here. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0aec12a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: Python application + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + release: + types: [ created ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + pytest \ No newline at end of file diff --git a/.gitignore b/.gitignore index 82f9275..09b12f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# App +node_red_flow.json + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/node_red_flow.json b/node_red_flow.json deleted file mode 100644 index 52c1f6c..0000000 --- a/node_red_flow.json +++ /dev/null @@ -1,8604 +0,0 @@ -[ - { - "id": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "type": "tab", - "label": "Paralelos Virtuais", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "799e5e6c-3546-497c-b44a-972baa884de2", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_1_sala_estar", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "ba903f0a-c29f-4cd1-bed9-2b95fa7f341d", - "4e80cfa3-d745-4b5e-bd4c-64f8fdeb13f4", - "4fc689cb-75cf-422d-bfa2-7421217a91c6", - "f3ffc003-3eb7-4c17-8628-02552d1aa87d", - "0237116b-9598-4652-9578-70ef1b43245d", - "8c037925-4c24-45e9-886e-8375c03a9420", - "72dbfb92-3ec7-4ada-b6ce-6913d06f40d0", - "10815e2e-3366-4de2-8016-d0409bb4f151", - "8d19fe86-54be-47f4-92b7-4b29ad01819b", - "9b8f6594-90c0-4021-9bb5-2c1c478e577f" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "ba903f0a-c29f-4cd1-bed9-2b95fa7f341d", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "switch.interruptor_1_sala_estar_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_1_sala_estar_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "4e80cfa3-d745-4b5e-bd4c-64f8fdeb13f4" - ], - [ - "4fc689cb-75cf-422d-bfa2-7421217a91c6" - ] - ] - }, - { - "id": "4e80cfa3-d745-4b5e-bd4c-64f8fdeb13f4", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Check switch.interruptor_corredor_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "f3ffc003-3eb7-4c17-8628-02552d1aa87d" - ] - ] - }, - { - "id": "4fc689cb-75cf-422d-bfa2-7421217a91c6", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Check switch.interruptor_corredor_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "0237116b-9598-4652-9578-70ef1b43245d" - ], - [] - ] - }, - { - "id": "f3ffc003-3eb7-4c17-8628-02552d1aa87d", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Turn ON switch.interruptor_corredor_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "0237116b-9598-4652-9578-70ef1b43245d", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Turn OFF switch.interruptor_corredor_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "8c037925-4c24-45e9-886e-8375c03a9420", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "switch.interruptor_1_sala_estar_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_1_sala_estar_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "72dbfb92-3ec7-4ada-b6ce-6913d06f40d0" - ], - [ - "10815e2e-3366-4de2-8016-d0409bb4f151" - ] - ] - }, - { - "id": "72dbfb92-3ec7-4ada-b6ce-6913d06f40d0", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Check switch.interruptor_corredor_interruptor_4 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "8d19fe86-54be-47f4-92b7-4b29ad01819b" - ] - ] - }, - { - "id": "10815e2e-3366-4de2-8016-d0409bb4f151", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Check switch.interruptor_corredor_interruptor_4 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "9b8f6594-90c0-4021-9bb5-2c1c478e577f" - ], - [] - ] - }, - { - "id": "8d19fe86-54be-47f4-92b7-4b29ad01819b", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Turn ON switch.interruptor_corredor_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "9b8f6594-90c0-4021-9bb5-2c1c478e577f", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "799e5e6c-3546-497c-b44a-972baa884de2", - "name": "Turn OFF switch.interruptor_corredor_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_corredor", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "8d57e883-a8ee-4211-863e-7ee5340612b7", - "d6150b6f-e970-4a38-8a3c-e7ef9ea19fbd", - "4b800a12-f52b-4f18-ad84-cd310b82b98e", - "98484a0b-a9fa-4ae9-9d39-31159ae4a92e", - "94816a3a-19a7-4425-96e8-818361614bbc", - "6e30e161-83e9-4bb5-a29b-b4953b959275", - "629ae7c1-80cb-4552-a20c-4d830862d4af", - "63c6de53-0971-40a0-8f0e-27a8d22d25a1", - "b4d49505-c035-448f-a59b-b1f9dacf7fc2", - "9623806d-adc7-4f00-a981-358d57d46760", - "40ffeb65-2b96-45d0-8130-8be734e7067b", - "84afdf9b-9f41-49e5-ac9b-3381132ef72e", - "a40cc05a-ccc8-4f71-8c92-5471fd7c420d", - "aa9f6444-6c25-43b4-8d43-4a18ffd9c949", - "69ef7955-749e-4961-9b63-a77462143770", - "0298ae3b-23cb-4e49-8197-9bc9fc23c926", - "afaaee49-d718-497b-8ff1-96f1d627bbd2", - "1109babf-6d6c-4ace-b472-10a56da145db", - "f58531dc-76b3-4745-a394-bd7030779155", - "e7632f13-cc25-482d-a303-d54c9f2bcdd2", - "50d2b7b8-efe6-42dd-9f3f-6a0554b045e7", - "942dda60-47fc-4f58-b847-e2479809a2e9", - "d4ff362f-3a81-4ca2-82f3-ee16b7b91160", - "a1c49fac-dd0a-456f-b317-ce5c44cb16f6", - "dc57ca77-b3fc-4a62-a7d4-2ef82892f127", - "42444c16-af9c-4903-ba82-7bf3b8d598c0" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "8d57e883-a8ee-4211-863e-7ee5340612b7", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "switch.interruptor_corredor_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_corredor_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "d6150b6f-e970-4a38-8a3c-e7ef9ea19fbd", - "6e30e161-83e9-4bb5-a29b-b4953b959275", - "9623806d-adc7-4f00-a981-358d57d46760" - ], - [ - "4b800a12-f52b-4f18-ad84-cd310b82b98e", - "629ae7c1-80cb-4552-a20c-4d830862d4af", - "40ffeb65-2b96-45d0-8130-8be734e7067b" - ] - ] - }, - { - "id": "d6150b6f-e970-4a38-8a3c-e7ef9ea19fbd", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interrutpor_2_sala_estar_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interrutpor_2_sala_estar_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "98484a0b-a9fa-4ae9-9d39-31159ae4a92e" - ] - ] - }, - { - "id": "4b800a12-f52b-4f18-ad84-cd310b82b98e", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interrutpor_2_sala_estar_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interrutpor_2_sala_estar_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "94816a3a-19a7-4425-96e8-818361614bbc" - ], - [] - ] - }, - { - "id": "98484a0b-a9fa-4ae9-9d39-31159ae4a92e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn ON switch.interrutpor_2_sala_estar_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interrutpor_2_sala_estar_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "94816a3a-19a7-4425-96e8-818361614bbc", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn OFF switch.interrutpor_2_sala_estar_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interrutpor_2_sala_estar_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "6e30e161-83e9-4bb5-a29b-b4953b959275", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_1_sala_estar_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_sala_estar_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [], - [ - "63c6de53-0971-40a0-8f0e-27a8d22d25a1" - ] - ] - }, - { - "id": "629ae7c1-80cb-4552-a20c-4d830862d4af", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_1_sala_estar_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_sala_estar_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 260, - "wires": [ - [ - "b4d49505-c035-448f-a59b-b1f9dacf7fc2" - ], - [] - ] - }, - { - "id": "63c6de53-0971-40a0-8f0e-27a8d22d25a1", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn ON switch.interruptor_1_sala_estar_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_sala_estar_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "b4d49505-c035-448f-a59b-b1f9dacf7fc2", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn OFF switch.interruptor_1_sala_estar_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_sala_estar_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "9623806d-adc7-4f00-a981-358d57d46760", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_2_cozinha_interruptor_4 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 260, - "wires": [ - [], - [ - "84afdf9b-9f41-49e5-ac9b-3381132ef72e" - ] - ] - }, - { - "id": "40ffeb65-2b96-45d0-8130-8be734e7067b", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_2_cozinha_interruptor_4 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 340, - "wires": [ - [ - "a40cc05a-ccc8-4f71-8c92-5471fd7c420d" - ], - [] - ] - }, - { - "id": "84afdf9b-9f41-49e5-ac9b-3381132ef72e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn ON switch.interruptor_2_cozinha_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 340, - "wires": [ - [] - ] - }, - { - "id": "a40cc05a-ccc8-4f71-8c92-5471fd7c420d", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn OFF switch.interruptor_2_cozinha_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "aa9f6444-6c25-43b4-8d43-4a18ffd9c949", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "switch.interruptor_corredor_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_corredor_interruptor_4", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "69ef7955-749e-4961-9b63-a77462143770", - "f58531dc-76b3-4745-a394-bd7030779155", - "d4ff362f-3a81-4ca2-82f3-ee16b7b91160" - ], - [ - "0298ae3b-23cb-4e49-8197-9bc9fc23c926", - "e7632f13-cc25-482d-a303-d54c9f2bcdd2", - "a1c49fac-dd0a-456f-b317-ce5c44cb16f6" - ] - ] - }, - { - "id": "69ef7955-749e-4961-9b63-a77462143770", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_2_cozinha_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "afaaee49-d718-497b-8ff1-96f1d627bbd2" - ] - ] - }, - { - "id": "0298ae3b-23cb-4e49-8197-9bc9fc23c926", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_2_cozinha_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "1109babf-6d6c-4ace-b472-10a56da145db" - ], - [] - ] - }, - { - "id": "afaaee49-d718-497b-8ff1-96f1d627bbd2", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn ON switch.interruptor_2_cozinha_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "1109babf-6d6c-4ace-b472-10a56da145db", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn OFF switch.interruptor_2_cozinha_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "f58531dc-76b3-4745-a394-bd7030779155", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interrutpor_2_sala_estar_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interrutpor_2_sala_estar_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [], - [ - "50d2b7b8-efe6-42dd-9f3f-6a0554b045e7" - ] - ] - }, - { - "id": "e7632f13-cc25-482d-a303-d54c9f2bcdd2", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interrutpor_2_sala_estar_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interrutpor_2_sala_estar_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 260, - "wires": [ - [ - "942dda60-47fc-4f58-b847-e2479809a2e9" - ], - [] - ] - }, - { - "id": "50d2b7b8-efe6-42dd-9f3f-6a0554b045e7", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn ON switch.interrutpor_2_sala_estar_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interrutpor_2_sala_estar_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "942dda60-47fc-4f58-b847-e2479809a2e9", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn OFF switch.interrutpor_2_sala_estar_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interrutpor_2_sala_estar_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "d4ff362f-3a81-4ca2-82f3-ee16b7b91160", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_1_sala_estar_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_sala_estar_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 260, - "wires": [ - [], - [ - "dc57ca77-b3fc-4a62-a7d4-2ef82892f127" - ] - ] - }, - { - "id": "a1c49fac-dd0a-456f-b317-ce5c44cb16f6", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Check switch.interruptor_1_sala_estar_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_sala_estar_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 340, - "wires": [ - [ - "42444c16-af9c-4903-ba82-7bf3b8d598c0" - ], - [] - ] - }, - { - "id": "dc57ca77-b3fc-4a62-a7d4-2ef82892f127", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn ON switch.interruptor_1_sala_estar_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_sala_estar_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 340, - "wires": [ - [] - ] - }, - { - "id": "42444c16-af9c-4903-ba82-7bf3b8d598c0", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "8d9185f1-90bb-43e4-858a-6912cc39333c", - "name": "Turn OFF switch.interruptor_1_sala_estar_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_sala_estar_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_2_sala_estar", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "a2a009d0-46c5-4493-8bd7-454aa771fdff", - "90f8582d-c452-4464-87f5-7a7c8796c975", - "1bb212e6-4aa8-4363-a376-4460bd9e081e", - "a26b0e4a-b10f-47e9-b12e-773e5c2b86d1", - "5c1bbcde-6b5f-4d19-8766-b54b3668ad85", - "169c8100-952a-463a-b70c-1c7563e55b39", - "c61ab232-e5de-4ef0-b9db-f9033994e048", - "8ca2d4fc-c8b0-41c2-925b-8afa5e7d27d8", - "71422f8c-3d2b-44e2-8a96-55783244053e", - "53f18a56-f87f-4b9e-bee9-69f86dbc5120", - "80ae717a-beb4-47ea-b5b9-9f1e14619861", - "ac20daed-1bb4-46ee-ab6e-5ffd947dbf65", - "d62e23db-ea06-4859-9e67-0a78d47c92fa", - "344f7122-1163-4bc9-88ff-7a94055b926e", - "26a645c1-743f-45bf-b7b5-00d9c7eab61f" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "a2a009d0-46c5-4493-8bd7-454aa771fdff", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "switch.interruptor_2_sala_estar_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_sala_estar_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "90f8582d-c452-4464-87f5-7a7c8796c975" - ], - [ - "1bb212e6-4aa8-4363-a376-4460bd9e081e" - ] - ] - }, - { - "id": "90f8582d-c452-4464-87f5-7a7c8796c975", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Check switch.interruptor_2_cozinha_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "a26b0e4a-b10f-47e9-b12e-773e5c2b86d1" - ] - ] - }, - { - "id": "1bb212e6-4aa8-4363-a376-4460bd9e081e", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Check switch.interruptor_2_cozinha_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "5c1bbcde-6b5f-4d19-8766-b54b3668ad85" - ], - [] - ] - }, - { - "id": "a26b0e4a-b10f-47e9-b12e-773e5c2b86d1", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Turn ON switch.interruptor_2_cozinha_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "5c1bbcde-6b5f-4d19-8766-b54b3668ad85", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Turn OFF switch.interruptor_2_cozinha_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "169c8100-952a-463a-b70c-1c7563e55b39", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "switch.interrutpor_2_sala_estar_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interrutpor_2_sala_estar_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "c61ab232-e5de-4ef0-b9db-f9033994e048" - ], - [ - "8ca2d4fc-c8b0-41c2-925b-8afa5e7d27d8" - ] - ] - }, - { - "id": "c61ab232-e5de-4ef0-b9db-f9033994e048", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Check switch.interruptor_corredor_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "71422f8c-3d2b-44e2-8a96-55783244053e" - ] - ] - }, - { - "id": "8ca2d4fc-c8b0-41c2-925b-8afa5e7d27d8", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Check switch.interruptor_corredor_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "53f18a56-f87f-4b9e-bee9-69f86dbc5120" - ], - [] - ] - }, - { - "id": "71422f8c-3d2b-44e2-8a96-55783244053e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Turn ON switch.interruptor_corredor_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "53f18a56-f87f-4b9e-bee9-69f86dbc5120", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Turn OFF switch.interruptor_corredor_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "80ae717a-beb4-47ea-b5b9-9f1e14619861", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "switch.interrutpor_2_sala_estar_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interrutpor_2_sala_estar_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "ac20daed-1bb4-46ee-ab6e-5ffd947dbf65" - ], - [ - "d62e23db-ea06-4859-9e67-0a78d47c92fa" - ] - ] - }, - { - "id": "ac20daed-1bb4-46ee-ab6e-5ffd947dbf65", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Check switch.interruptor_corredor_interruptor_4 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "344f7122-1163-4bc9-88ff-7a94055b926e" - ] - ] - }, - { - "id": "d62e23db-ea06-4859-9e67-0a78d47c92fa", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Check switch.interruptor_corredor_interruptor_4 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "26a645c1-743f-45bf-b7b5-00d9c7eab61f" - ], - [] - ] - }, - { - "id": "344f7122-1163-4bc9-88ff-7a94055b926e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Turn ON switch.interruptor_corredor_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "26a645c1-743f-45bf-b7b5-00d9c7eab61f", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "50d7edb8-82ec-4d60-8649-e0a08c75981b", - "name": "Turn OFF switch.interruptor_corredor_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_2_cozinha", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "5b212b6b-b875-415b-a087-ef3efc2653ea", - "a1f5b16b-b811-4aa0-bdc7-749833f7d51b", - "e8b3bff1-48e4-4c0c-96f2-b1b0defbf289", - "8230d4c6-02c0-451a-a9d5-98e8d4187cfe", - "96b720a9-3632-44a5-864c-82cac235e2e1", - "0d184b30-ad41-44a1-b814-d1f7e6e31fee", - "ed775960-fe03-4455-aebf-039fa4c0e163", - "9803e2fc-477b-499c-ab39-aa03519bb405", - "ca73f0ae-46b9-4226-bec3-48ef25c5c7ab", - "79b26c2a-8ece-470e-85a5-84b4781acff9", - "5331bedc-990d-4337-aa54-189b1f10dfb7", - "cb5dd321-8dcf-4141-9a03-eef510af1c35", - "5adce257-6cda-4cef-9351-e7a694fb4327", - "6a7a2324-1766-494a-aab6-28bfaffd2858", - "211dfc38-f6b3-47a6-b60a-2f8392dc0bfb", - "eae35ba6-aacf-4c13-8139-6ddc0a9cb563", - "90eb1777-181d-4767-8fd8-e4f58d2d6c3c", - "938b9cab-1976-490c-919a-c78d98a8d4e5", - "aab0f4dd-9650-46bd-bfe7-93b460d699b8", - "e302865e-b186-432b-91c8-4b1ec995b09c" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "5b212b6b-b875-415b-a087-ef3efc2653ea", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "switch.interruptor_2_cozinha_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_cozinha_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "a1f5b16b-b811-4aa0-bdc7-749833f7d51b" - ], - [ - "e8b3bff1-48e4-4c0c-96f2-b1b0defbf289" - ] - ] - }, - { - "id": "a1f5b16b-b811-4aa0-bdc7-749833f7d51b", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_2_sala_estar_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_sala_estar_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "8230d4c6-02c0-451a-a9d5-98e8d4187cfe" - ] - ] - }, - { - "id": "e8b3bff1-48e4-4c0c-96f2-b1b0defbf289", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_2_sala_estar_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_sala_estar_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "96b720a9-3632-44a5-864c-82cac235e2e1" - ], - [] - ] - }, - { - "id": "8230d4c6-02c0-451a-a9d5-98e8d4187cfe", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn ON switch.interruptor_2_sala_estar_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_sala_estar_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "96b720a9-3632-44a5-864c-82cac235e2e1", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn OFF switch.interruptor_2_sala_estar_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_sala_estar_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "0d184b30-ad41-44a1-b814-d1f7e6e31fee", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "switch.interruptor_2_cozinha_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_cozinha_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "ed775960-fe03-4455-aebf-039fa4c0e163" - ], - [ - "9803e2fc-477b-499c-ab39-aa03519bb405" - ] - ] - }, - { - "id": "ed775960-fe03-4455-aebf-039fa4c0e163", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_corredor_interruptor_4 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "ca73f0ae-46b9-4226-bec3-48ef25c5c7ab" - ] - ] - }, - { - "id": "9803e2fc-477b-499c-ab39-aa03519bb405", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_corredor_interruptor_4 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "79b26c2a-8ece-470e-85a5-84b4781acff9" - ], - [] - ] - }, - { - "id": "ca73f0ae-46b9-4226-bec3-48ef25c5c7ab", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn ON switch.interruptor_corredor_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "79b26c2a-8ece-470e-85a5-84b4781acff9", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn OFF switch.interruptor_corredor_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "5331bedc-990d-4337-aa54-189b1f10dfb7", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "switch.interruptor_2_cozinha_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_cozinha_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "cb5dd321-8dcf-4141-9a03-eef510af1c35" - ], - [ - "5adce257-6cda-4cef-9351-e7a694fb4327" - ] - ] - }, - { - "id": "cb5dd321-8dcf-4141-9a03-eef510af1c35", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_1_cozinha_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_cozinha_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "6a7a2324-1766-494a-aab6-28bfaffd2858" - ] - ] - }, - { - "id": "5adce257-6cda-4cef-9351-e7a694fb4327", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_1_cozinha_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_cozinha_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "211dfc38-f6b3-47a6-b60a-2f8392dc0bfb" - ], - [] - ] - }, - { - "id": "6a7a2324-1766-494a-aab6-28bfaffd2858", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn ON switch.interruptor_1_cozinha_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_cozinha_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "211dfc38-f6b3-47a6-b60a-2f8392dc0bfb", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn OFF switch.interruptor_1_cozinha_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_cozinha_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "eae35ba6-aacf-4c13-8139-6ddc0a9cb563", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "switch.interruptor_2_cozinha_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_cozinha_interruptor_4", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "90eb1777-181d-4767-8fd8-e4f58d2d6c3c" - ], - [ - "938b9cab-1976-490c-919a-c78d98a8d4e5" - ] - ] - }, - { - "id": "90eb1777-181d-4767-8fd8-e4f58d2d6c3c", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_corredor_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "aab0f4dd-9650-46bd-bfe7-93b460d699b8" - ] - ] - }, - { - "id": "938b9cab-1976-490c-919a-c78d98a8d4e5", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Check switch.interruptor_corredor_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_corredor_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "e302865e-b186-432b-91c8-4b1ec995b09c" - ], - [] - ] - }, - { - "id": "aab0f4dd-9650-46bd-bfe7-93b460d699b8", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn ON switch.interruptor_corredor_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "e302865e-b186-432b-91c8-4b1ec995b09c", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3532f2cf-5eed-4746-8489-beb11e1b3637", - "name": "Turn OFF switch.interruptor_corredor_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_corredor_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_1_escritorio", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "c029a006-93f0-471a-90f9-ae516af66395", - "a656d5dd-7d2d-4e50-9ec3-0178521df3b0", - "d0241fe7-e1d6-4d65-8f3e-6d2cef93ced6", - "3dcfe6ef-4a0e-40ee-991b-bba91daa56c7", - "3ea3b85e-bc17-4198-82bd-e6b6a508f4b4", - "6f8174db-6f22-45d3-87f1-d16642052636", - "0073e1a3-3d5e-4bbe-984b-0b68c7cc7ef6", - "7209cd66-fa4b-4144-a078-89e9f9613faf", - "f262eced-bdb4-4447-aebf-7a7cf7fad4db", - "9a78fade-5bfd-4cee-ba4c-3fa2e95f44d4", - "2f337f55-eae8-40aa-8ee3-f74649132a60", - "7c377a8f-03fa-4183-a750-0d2b6101b3e6", - "4f6c41a3-939e-4bda-8159-9a91b6aa42a0", - "9e1c7654-abc5-4f7f-bd79-9f0cd5e81840", - "4112d30a-68d4-48a2-8652-e3c8bbad4aa1" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "c029a006-93f0-471a-90f9-ae516af66395", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "switch.interruptor_1_escritorio_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_1_escritorio_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "a656d5dd-7d2d-4e50-9ec3-0178521df3b0" - ], - [ - "d0241fe7-e1d6-4d65-8f3e-6d2cef93ced6" - ] - ] - }, - { - "id": "a656d5dd-7d2d-4e50-9ec3-0178521df3b0", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Check switch.interruptor_2_escritorio_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_escritorio_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "3dcfe6ef-4a0e-40ee-991b-bba91daa56c7" - ] - ] - }, - { - "id": "d0241fe7-e1d6-4d65-8f3e-6d2cef93ced6", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Check switch.interruptor_2_escritorio_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_escritorio_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "3ea3b85e-bc17-4198-82bd-e6b6a508f4b4" - ], - [] - ] - }, - { - "id": "3dcfe6ef-4a0e-40ee-991b-bba91daa56c7", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Turn ON switch.interruptor_2_escritorio_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_escritorio_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "3ea3b85e-bc17-4198-82bd-e6b6a508f4b4", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Turn OFF switch.interruptor_2_escritorio_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_escritorio_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "6f8174db-6f22-45d3-87f1-d16642052636", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "switch.interruptor_1_escritorio_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_1_escritorio_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "0073e1a3-3d5e-4bbe-984b-0b68c7cc7ef6" - ], - [ - "7209cd66-fa4b-4144-a078-89e9f9613faf" - ] - ] - }, - { - "id": "0073e1a3-3d5e-4bbe-984b-0b68c7cc7ef6", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Check switch.interruptor_2_escritorio_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_escritorio_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "f262eced-bdb4-4447-aebf-7a7cf7fad4db" - ] - ] - }, - { - "id": "7209cd66-fa4b-4144-a078-89e9f9613faf", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Check switch.interruptor_2_escritorio_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_escritorio_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "9a78fade-5bfd-4cee-ba4c-3fa2e95f44d4" - ], - [] - ] - }, - { - "id": "f262eced-bdb4-4447-aebf-7a7cf7fad4db", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Turn ON switch.interruptor_2_escritorio_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_escritorio_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "9a78fade-5bfd-4cee-ba4c-3fa2e95f44d4", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Turn OFF switch.interruptor_2_escritorio_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_escritorio_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "2f337f55-eae8-40aa-8ee3-f74649132a60", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "switch.interruptor_1_escritorio_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_1_escritorio_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "7c377a8f-03fa-4183-a750-0d2b6101b3e6" - ], - [ - "4f6c41a3-939e-4bda-8159-9a91b6aa42a0" - ] - ] - }, - { - "id": "7c377a8f-03fa-4183-a750-0d2b6101b3e6", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Check switch.interruptor_2_escritorio_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_escritorio_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "9e1c7654-abc5-4f7f-bd79-9f0cd5e81840" - ] - ] - }, - { - "id": "4f6c41a3-939e-4bda-8159-9a91b6aa42a0", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Check switch.interruptor_2_escritorio_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_escritorio_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "4112d30a-68d4-48a2-8652-e3c8bbad4aa1" - ], - [] - ] - }, - { - "id": "9e1c7654-abc5-4f7f-bd79-9f0cd5e81840", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Turn ON switch.interruptor_2_escritorio_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_escritorio_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "4112d30a-68d4-48a2-8652-e3c8bbad4aa1", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "60ead48e-19ba-407b-9b49-ba9d1cbc27f8", - "name": "Turn OFF switch.interruptor_2_escritorio_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_escritorio_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_2_escritorio", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "919bc612-d1e5-4a8f-8a77-544591dc59cb", - "67045ecf-4953-47eb-9889-fa43c3070d25", - "cd27976f-2455-4dc9-bd7c-ecb434730ada", - "e9693ac0-a891-4e5f-a4ff-0899ca7b0ff8", - "5145e5ee-f51e-44e4-bf57-6691a4f2018e", - "45ffb042-76c6-4e71-9e34-b70aaa68681b", - "cdb5e22e-0a27-43aa-824e-615c28d38052", - "a5eb0915-7b24-4dd0-b935-be45b9ecedeb", - "573a78fd-2cb5-45d9-84f0-4c173fe85d40", - "4b2e4d42-498a-46be-9c1d-0c20bdfa23a7", - "f74039f9-99dd-4733-adf7-980f659bee2d", - "fe79d22b-af69-4d2f-acce-62005e1b1d70", - "e33192ca-38ea-4957-b4e8-46b4aa1711f4", - "3371ff68-3c6e-49f8-ae23-303301a2175f", - "1fe6f62d-d3cb-4186-8223-716aff09ddea" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "919bc612-d1e5-4a8f-8a77-544591dc59cb", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "switch.interruptor_2_escritorio_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_escritorio_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "67045ecf-4953-47eb-9889-fa43c3070d25" - ], - [ - "cd27976f-2455-4dc9-bd7c-ecb434730ada" - ] - ] - }, - { - "id": "67045ecf-4953-47eb-9889-fa43c3070d25", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Check switch.interruptor_1_escritorio_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_escritorio_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "e9693ac0-a891-4e5f-a4ff-0899ca7b0ff8" - ] - ] - }, - { - "id": "cd27976f-2455-4dc9-bd7c-ecb434730ada", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Check switch.interruptor_1_escritorio_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_escritorio_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "5145e5ee-f51e-44e4-bf57-6691a4f2018e" - ], - [] - ] - }, - { - "id": "e9693ac0-a891-4e5f-a4ff-0899ca7b0ff8", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Turn ON switch.interruptor_1_escritorio_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_escritorio_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "5145e5ee-f51e-44e4-bf57-6691a4f2018e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Turn OFF switch.interruptor_1_escritorio_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_escritorio_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "45ffb042-76c6-4e71-9e34-b70aaa68681b", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "switch.interruptor_2_escritorio_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_escritorio_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "cdb5e22e-0a27-43aa-824e-615c28d38052" - ], - [ - "a5eb0915-7b24-4dd0-b935-be45b9ecedeb" - ] - ] - }, - { - "id": "cdb5e22e-0a27-43aa-824e-615c28d38052", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Check switch.interruptor_1_escritorio_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_escritorio_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "573a78fd-2cb5-45d9-84f0-4c173fe85d40" - ] - ] - }, - { - "id": "a5eb0915-7b24-4dd0-b935-be45b9ecedeb", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Check switch.interruptor_1_escritorio_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_escritorio_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "4b2e4d42-498a-46be-9c1d-0c20bdfa23a7" - ], - [] - ] - }, - { - "id": "573a78fd-2cb5-45d9-84f0-4c173fe85d40", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Turn ON switch.interruptor_1_escritorio_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_escritorio_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "4b2e4d42-498a-46be-9c1d-0c20bdfa23a7", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Turn OFF switch.interruptor_1_escritorio_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_escritorio_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "f74039f9-99dd-4733-adf7-980f659bee2d", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "switch.interruptor_2_escritorio_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_escritorio_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "fe79d22b-af69-4d2f-acce-62005e1b1d70" - ], - [ - "e33192ca-38ea-4957-b4e8-46b4aa1711f4" - ] - ] - }, - { - "id": "fe79d22b-af69-4d2f-acce-62005e1b1d70", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Check switch.interruptor_1_escritorio_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_escritorio_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "3371ff68-3c6e-49f8-ae23-303301a2175f" - ] - ] - }, - { - "id": "e33192ca-38ea-4957-b4e8-46b4aa1711f4", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Check switch.interruptor_1_escritorio_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_escritorio_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "1fe6f62d-d3cb-4186-8223-716aff09ddea" - ], - [] - ] - }, - { - "id": "3371ff68-3c6e-49f8-ae23-303301a2175f", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Turn ON switch.interruptor_1_escritorio_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_escritorio_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "1fe6f62d-d3cb-4186-8223-716aff09ddea", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "9d0f0b1d-8c57-4262-94cf-4864d44c6a9a", - "name": "Turn OFF switch.interruptor_1_escritorio_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_escritorio_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_1_quarto_thomas", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "a2f00370-7e5f-4b6e-8997-3a335ab402cd", - "32374b90-219c-432c-b986-70cf47b3a116", - "a601d15d-0b95-4756-9b29-f17ad6bb6154", - "afb5419d-10c0-4206-9e0c-a1c1f91314df", - "3c2f6bc9-df97-444e-b1a1-fd723b4d1e4b", - "10ca4adc-dae5-4f08-a86d-b510dca21e93", - "364736f3-92e3-4b7a-8afc-c0480f6a5fa6", - "2821e3b5-f3bc-4a18-8be7-6777ab0fdcc3", - "6a26af38-8fbb-413c-9724-4cdd97d07155", - "837d9ad3-db3e-4adf-a066-8575e4d66398", - "a2ec61ef-d24f-4a2f-92a0-042e989d2f33", - "ce468754-9676-4b99-b6a2-2c24abccef17", - "40d4dc73-8fa8-46cc-a7e4-bb7b0529cdce", - "9568d774-16c4-49d5-9a58-3d59d593319d", - "6893a43c-60c1-4ced-bba3-2b42f2c04c68" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "a2f00370-7e5f-4b6e-8997-3a335ab402cd", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "light.interruptor_1_quarto_thomas_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "light.interruptor_1_quarto_thomas_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "32374b90-219c-432c-b986-70cf47b3a116" - ], - [ - "a601d15d-0b95-4756-9b29-f17ad6bb6154" - ] - ] - }, - { - "id": "32374b90-219c-432c-b986-70cf47b3a116", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Check switch.interruptor_2_quarto_thomas_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_thomas_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "afb5419d-10c0-4206-9e0c-a1c1f91314df" - ] - ] - }, - { - "id": "a601d15d-0b95-4756-9b29-f17ad6bb6154", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Check switch.interruptor_2_quarto_thomas_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_thomas_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "3c2f6bc9-df97-444e-b1a1-fd723b4d1e4b" - ], - [] - ] - }, - { - "id": "afb5419d-10c0-4206-9e0c-a1c1f91314df", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Turn ON switch.interruptor_2_quarto_thomas_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_thomas_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "3c2f6bc9-df97-444e-b1a1-fd723b4d1e4b", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Turn OFF switch.interruptor_2_quarto_thomas_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_thomas_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "10ca4adc-dae5-4f08-a86d-b510dca21e93", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "light.interruptor_1_quarto_thomas_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "light.interruptor_1_quarto_thomas_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "364736f3-92e3-4b7a-8afc-c0480f6a5fa6" - ], - [ - "2821e3b5-f3bc-4a18-8be7-6777ab0fdcc3" - ] - ] - }, - { - "id": "364736f3-92e3-4b7a-8afc-c0480f6a5fa6", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Check switch.interruptor_2_quarto_thomas_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_thomas_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "6a26af38-8fbb-413c-9724-4cdd97d07155" - ] - ] - }, - { - "id": "2821e3b5-f3bc-4a18-8be7-6777ab0fdcc3", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Check switch.interruptor_2_quarto_thomas_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_thomas_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "837d9ad3-db3e-4adf-a066-8575e4d66398" - ], - [] - ] - }, - { - "id": "6a26af38-8fbb-413c-9724-4cdd97d07155", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Turn ON switch.interruptor_2_quarto_thomas_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_thomas_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "837d9ad3-db3e-4adf-a066-8575e4d66398", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Turn OFF switch.interruptor_2_quarto_thomas_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_thomas_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "a2ec61ef-d24f-4a2f-92a0-042e989d2f33", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "light.interruptor_1_quarto_thomas_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "light.interruptor_1_quarto_thomas_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "ce468754-9676-4b99-b6a2-2c24abccef17" - ], - [ - "40d4dc73-8fa8-46cc-a7e4-bb7b0529cdce" - ] - ] - }, - { - "id": "ce468754-9676-4b99-b6a2-2c24abccef17", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Check switch.interruptor_2_quarto_thomas_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_thomas_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "9568d774-16c4-49d5-9a58-3d59d593319d" - ] - ] - }, - { - "id": "40d4dc73-8fa8-46cc-a7e4-bb7b0529cdce", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Check switch.interruptor_2_quarto_thomas_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_thomas_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "6893a43c-60c1-4ced-bba3-2b42f2c04c68" - ], - [] - ] - }, - { - "id": "9568d774-16c4-49d5-9a58-3d59d593319d", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Turn ON switch.interruptor_2_quarto_thomas_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_thomas_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "6893a43c-60c1-4ced-bba3-2b42f2c04c68", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "a3cbbe23-b5cd-4474-8a14-f08fe49e6531", - "name": "Turn OFF switch.interruptor_2_quarto_thomas_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_thomas_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_2_quarto_thomas", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "e40dd7b0-939f-4daf-9cd4-33a22ec7cc31", - "b0a210b8-1508-4d74-8ccd-ade38c413694", - "10cc4cee-9e56-4520-8b9c-b1d7b849e036", - "f0de6fdd-49b0-44a9-b0a3-50b87666e983", - "61aabaaf-3287-4948-a4e7-a5fe8bf4f765", - "83784aa1-e092-45fb-ab7b-b55da9ab077b", - "cbdd08d5-201c-4222-8145-e7aa1ff1b142", - "ad5acb36-e11f-4fd0-a10c-a5642a3685c2", - "8c1ba67a-d6ef-4189-a3fc-7ea7f5121826", - "bb1dcede-e0d4-46dc-a768-7ac6300c3c43", - "cd7a9cae-7879-42a8-8615-d00751a4a441", - "b8823b4f-a102-4690-8ca3-d46b34b8f2eb", - "6dcab88d-274d-4e39-8966-21fde6a0a362", - "0fc8a1c8-fd75-4c22-85ee-2cd9a60a7517", - "0aa33a76-b998-43d3-bd05-2e5ec1310975" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "e40dd7b0-939f-4daf-9cd4-33a22ec7cc31", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "switch.interruptor_2_quarto_thomas_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_quarto_thomas_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "b0a210b8-1508-4d74-8ccd-ade38c413694" - ], - [ - "10cc4cee-9e56-4520-8b9c-b1d7b849e036" - ] - ] - }, - { - "id": "b0a210b8-1508-4d74-8ccd-ade38c413694", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Check light.interruptor_1_quarto_thomas_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "light.interruptor_1_quarto_thomas_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "f0de6fdd-49b0-44a9-b0a3-50b87666e983" - ] - ] - }, - { - "id": "10cc4cee-9e56-4520-8b9c-b1d7b849e036", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Check light.interruptor_1_quarto_thomas_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "light.interruptor_1_quarto_thomas_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "61aabaaf-3287-4948-a4e7-a5fe8bf4f765" - ], - [] - ] - }, - { - "id": "f0de6fdd-49b0-44a9-b0a3-50b87666e983", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Turn ON light.interruptor_1_quarto_thomas_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "light.interruptor_1_quarto_thomas_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "61aabaaf-3287-4948-a4e7-a5fe8bf4f765", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Turn OFF light.interruptor_1_quarto_thomas_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "light.interruptor_1_quarto_thomas_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "83784aa1-e092-45fb-ab7b-b55da9ab077b", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "switch.interruptor_2_quarto_thomas_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_quarto_thomas_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "cbdd08d5-201c-4222-8145-e7aa1ff1b142" - ], - [ - "ad5acb36-e11f-4fd0-a10c-a5642a3685c2" - ] - ] - }, - { - "id": "cbdd08d5-201c-4222-8145-e7aa1ff1b142", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Check light.interruptor_1_quarto_thomas_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "light.interruptor_1_quarto_thomas_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "8c1ba67a-d6ef-4189-a3fc-7ea7f5121826" - ] - ] - }, - { - "id": "ad5acb36-e11f-4fd0-a10c-a5642a3685c2", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Check light.interruptor_1_quarto_thomas_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "light.interruptor_1_quarto_thomas_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "bb1dcede-e0d4-46dc-a768-7ac6300c3c43" - ], - [] - ] - }, - { - "id": "8c1ba67a-d6ef-4189-a3fc-7ea7f5121826", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Turn ON light.interruptor_1_quarto_thomas_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "light.interruptor_1_quarto_thomas_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "bb1dcede-e0d4-46dc-a768-7ac6300c3c43", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Turn OFF light.interruptor_1_quarto_thomas_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "light.interruptor_1_quarto_thomas_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "cd7a9cae-7879-42a8-8615-d00751a4a441", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "switch.interruptor_2_quarto_thomas_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_quarto_thomas_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "b8823b4f-a102-4690-8ca3-d46b34b8f2eb" - ], - [ - "6dcab88d-274d-4e39-8966-21fde6a0a362" - ] - ] - }, - { - "id": "b8823b4f-a102-4690-8ca3-d46b34b8f2eb", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Check light.interruptor_1_quarto_thomas_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "light.interruptor_1_quarto_thomas_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "0fc8a1c8-fd75-4c22-85ee-2cd9a60a7517" - ] - ] - }, - { - "id": "6dcab88d-274d-4e39-8966-21fde6a0a362", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Check light.interruptor_1_quarto_thomas_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "light.interruptor_1_quarto_thomas_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "0aa33a76-b998-43d3-bd05-2e5ec1310975" - ], - [] - ] - }, - { - "id": "0fc8a1c8-fd75-4c22-85ee-2cd9a60a7517", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Turn ON light.interruptor_1_quarto_thomas_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "light.interruptor_1_quarto_thomas_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "0aa33a76-b998-43d3-bd05-2e5ec1310975", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "d9271b00-6aab-44a6-8ffa-dc7855c3ecf2", - "name": "Turn OFF light.interruptor_1_quarto_thomas_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "light.interruptor_1_quarto_thomas_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_2_quarto_casal", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "456afbd6-0f3b-4ce3-9224-33c7580ea095", - "f7453985-baf8-492c-931e-b5c6b2cfe67a", - "f07cde31-3558-4006-a699-512c6b043fd0", - "ef10cb1c-cd67-463c-a2ec-76eca43a0423", - "1832d440-b81b-43e2-9af9-b8bb1b418c89", - "9073c4ad-f406-47bd-b40e-2a1362cb7d96", - "e1116b23-c3c7-4dea-9063-4b26283dc508", - "5bbd5574-8421-481d-af41-c50a100d5aea", - "92aa9044-8329-4dbe-ac2b-875962479b15", - "085e7981-eabc-4db6-9988-f5d3f3010201", - "7dbd3854-c038-451a-b921-2d1dc3556998", - "b432f501-2735-462d-96a4-256856f9400a", - "c4321a64-d2fe-4300-b2ec-80fa79ea7f94", - "04421d9d-86d1-462d-92b1-029c29cc0d0e", - "b4ba65e0-4886-442a-a3a4-f79f0bdb0f1c", - "a3bcb6b5-5b33-41e4-bee3-b66da3e5fd5f", - "d7148947-a2ed-4d51-a1de-c3245a60ccf4", - "95730b13-6ff7-4af6-8594-4eaf29c65f68", - "75101693-ce86-4174-a0d3-7408db4173ca", - "d63d95ed-a4d5-4815-850d-a19ab4ad69ca", - "bf5dfa7d-94e7-4531-a7bd-7c9286997f6d", - "e7709120-51cb-4624-9c9a-d11638bf831e", - "3ed63708-285d-4ed8-bcd2-c088981d76ef" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "456afbd6-0f3b-4ce3-9224-33c7580ea095", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "switch.interruptor_2_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_quarto_casal_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "f7453985-baf8-492c-931e-b5c6b2cfe67a" - ], - [ - "f07cde31-3558-4006-a699-512c6b043fd0" - ] - ] - }, - { - "id": "f7453985-baf8-492c-931e-b5c6b2cfe67a", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_1_quarto_casal_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "ef10cb1c-cd67-463c-a2ec-76eca43a0423" - ] - ] - }, - { - "id": "f07cde31-3558-4006-a699-512c6b043fd0", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_1_quarto_casal_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_1_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "1832d440-b81b-43e2-9af9-b8bb1b418c89" - ], - [] - ] - }, - { - "id": "ef10cb1c-cd67-463c-a2ec-76eca43a0423", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn ON switch.interruptor_1_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "1832d440-b81b-43e2-9af9-b8bb1b418c89", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn OFF switch.interruptor_1_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_1_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "9073c4ad-f406-47bd-b40e-2a1362cb7d96", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "switch.interruptor_2_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_quarto_casal_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "e1116b23-c3c7-4dea-9063-4b26283dc508", - "7dbd3854-c038-451a-b921-2d1dc3556998" - ], - [ - "5bbd5574-8421-481d-af41-c50a100d5aea", - "b432f501-2735-462d-96a4-256856f9400a" - ] - ] - }, - { - "id": "e1116b23-c3c7-4dea-9063-4b26283dc508", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_3_quarto_casal_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_3_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "92aa9044-8329-4dbe-ac2b-875962479b15" - ] - ] - }, - { - "id": "5bbd5574-8421-481d-af41-c50a100d5aea", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_3_quarto_casal_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_3_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "085e7981-eabc-4db6-9988-f5d3f3010201" - ], - [] - ] - }, - { - "id": "92aa9044-8329-4dbe-ac2b-875962479b15", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn ON switch.interruptor_3_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_3_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "085e7981-eabc-4db6-9988-f5d3f3010201", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn OFF switch.interruptor_3_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_3_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "7dbd3854-c038-451a-b921-2d1dc3556998", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_4 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [], - [ - "c4321a64-d2fe-4300-b2ec-80fa79ea7f94" - ] - ] - }, - { - "id": "b432f501-2735-462d-96a4-256856f9400a", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_4 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_4", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 260, - "wires": [ - [ - "04421d9d-86d1-462d-92b1-029c29cc0d0e" - ], - [] - ] - }, - { - "id": "c4321a64-d2fe-4300-b2ec-80fa79ea7f94", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn ON switch.interruptor_4_quarto_casal_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "04421d9d-86d1-462d-92b1-029c29cc0d0e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn OFF switch.interruptor_4_quarto_casal_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_4" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "b4ba65e0-4886-442a-a3a4-f79f0bdb0f1c", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "switch.interruptor_2_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_2_quarto_casal_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "a3bcb6b5-5b33-41e4-bee3-b66da3e5fd5f", - "d63d95ed-a4d5-4815-850d-a19ab4ad69ca" - ], - [ - "d7148947-a2ed-4d51-a1de-c3245a60ccf4", - "bf5dfa7d-94e7-4531-a7bd-7c9286997f6d" - ] - ] - }, - { - "id": "a3bcb6b5-5b33-41e4-bee3-b66da3e5fd5f", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_5 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_5", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "95730b13-6ff7-4af6-8594-4eaf29c65f68" - ] - ] - }, - { - "id": "d7148947-a2ed-4d51-a1de-c3245a60ccf4", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_5 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_5", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "75101693-ce86-4174-a0d3-7408db4173ca" - ], - [] - ] - }, - { - "id": "95730b13-6ff7-4af6-8594-4eaf29c65f68", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn ON switch.interruptor_4_quarto_casal_interruptor_5", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_5" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "75101693-ce86-4174-a0d3-7408db4173ca", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn OFF switch.interruptor_4_quarto_casal_interruptor_5", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_5" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "d63d95ed-a4d5-4815-850d-a19ab4ad69ca", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_3_quarto_casal_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_3_quarto_casal_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [], - [ - "e7709120-51cb-4624-9c9a-d11638bf831e" - ] - ] - }, - { - "id": "bf5dfa7d-94e7-4531-a7bd-7c9286997f6d", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Check switch.interruptor_3_quarto_casal_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_3_quarto_casal_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 260, - "wires": [ - [ - "3ed63708-285d-4ed8-bcd2-c088981d76ef" - ], - [] - ] - }, - { - "id": "e7709120-51cb-4624-9c9a-d11638bf831e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn ON switch.interruptor_3_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_3_quarto_casal_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "3ed63708-285d-4ed8-bcd2-c088981d76ef", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "313a2cec-1143-4c7b-9533-9c8e7c2722b2", - "name": "Turn OFF switch.interruptor_3_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_3_quarto_casal_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "ba5a6dcf-043a-4f04-8e66-32c4ec5222eb", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_1_quarto_casal", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "4d8ce1f5-e612-4005-8ef4-b0cfb95382b5", - "74b82c32-7a31-4422-9016-86bd38e17d52", - "64809907-e81f-4984-9c15-9c047fb15d53", - "891bed15-c940-4b71-bce3-b23b2d95f573", - "1d422c85-2288-44fd-a79f-7a8a816baf25" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "4d8ce1f5-e612-4005-8ef4-b0cfb95382b5", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ba5a6dcf-043a-4f04-8e66-32c4ec5222eb", - "name": "switch.interruptor_1_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_1_quarto_casal_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "74b82c32-7a31-4422-9016-86bd38e17d52" - ], - [ - "64809907-e81f-4984-9c15-9c047fb15d53" - ] - ] - }, - { - "id": "74b82c32-7a31-4422-9016-86bd38e17d52", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ba5a6dcf-043a-4f04-8e66-32c4ec5222eb", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "891bed15-c940-4b71-bce3-b23b2d95f573" - ] - ] - }, - { - "id": "64809907-e81f-4984-9c15-9c047fb15d53", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ba5a6dcf-043a-4f04-8e66-32c4ec5222eb", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "1d422c85-2288-44fd-a79f-7a8a816baf25" - ], - [] - ] - }, - { - "id": "891bed15-c940-4b71-bce3-b23b2d95f573", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ba5a6dcf-043a-4f04-8e66-32c4ec5222eb", - "name": "Turn ON switch.interruptor_2_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "1d422c85-2288-44fd-a79f-7a8a816baf25", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ba5a6dcf-043a-4f04-8e66-32c4ec5222eb", - "name": "Turn OFF switch.interruptor_2_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_3_quarto_casal", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "976ba935-f384-455a-bb41-a6c32824aee2", - "e1095ec7-df17-4652-afb8-06c580b30550", - "68fda1bb-fd55-49e1-b5d9-36f72f75a6c2", - "08cfa7c6-8b66-4e11-b211-0519532682cf", - "cd0b338b-6368-45a8-8b4d-4c761c6ec0f3", - "fe034166-dec0-4f2b-a51a-91295352b414", - "ec80d5a4-dc66-4e9b-8018-6ff21d1f7394", - "a3107079-446e-4a86-be99-30fdb928a1e8", - "4f89a9a3-897e-4428-8c06-cb97ca1d218d", - "708e7a56-10d5-409b-8afe-77b72e4e1970", - "df0edd54-7add-4448-9544-15ccec17c180", - "dc43324f-cebe-456b-9067-37da49f1c8b7", - "b615640a-7e58-482e-a53a-74fd338043ab", - "a966197b-1177-45fa-9ed5-2443b335ab2d", - "be088eeb-4de8-4cdc-b4ca-1e94244bf6bb" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "976ba935-f384-455a-bb41-a6c32824aee2", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "switch.interruptor_3_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_3_quarto_casal_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "e1095ec7-df17-4652-afb8-06c580b30550" - ], - [ - "68fda1bb-fd55-49e1-b5d9-36f72f75a6c2" - ] - ] - }, - { - "id": "e1095ec7-df17-4652-afb8-06c580b30550", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "08cfa7c6-8b66-4e11-b211-0519532682cf" - ] - ] - }, - { - "id": "68fda1bb-fd55-49e1-b5d9-36f72f75a6c2", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "cd0b338b-6368-45a8-8b4d-4c761c6ec0f3" - ], - [] - ] - }, - { - "id": "08cfa7c6-8b66-4e11-b211-0519532682cf", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Turn ON switch.interruptor_2_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "cd0b338b-6368-45a8-8b4d-4c761c6ec0f3", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Turn OFF switch.interruptor_2_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "fe034166-dec0-4f2b-a51a-91295352b414", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "switch.interruptor_3_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_3_quarto_casal_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "ec80d5a4-dc66-4e9b-8018-6ff21d1f7394" - ], - [ - "a3107079-446e-4a86-be99-30fdb928a1e8" - ] - ] - }, - { - "id": "ec80d5a4-dc66-4e9b-8018-6ff21d1f7394", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "4f89a9a3-897e-4428-8c06-cb97ca1d218d" - ] - ] - }, - { - "id": "a3107079-446e-4a86-be99-30fdb928a1e8", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "708e7a56-10d5-409b-8afe-77b72e4e1970" - ], - [] - ] - }, - { - "id": "4f89a9a3-897e-4428-8c06-cb97ca1d218d", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Turn ON switch.interruptor_2_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "708e7a56-10d5-409b-8afe-77b72e4e1970", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Turn OFF switch.interruptor_2_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "df0edd54-7add-4448-9544-15ccec17c180", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "switch.interruptor_3_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_3_quarto_casal_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "dc43324f-cebe-456b-9067-37da49f1c8b7" - ], - [ - "b615640a-7e58-482e-a53a-74fd338043ab" - ] - ] - }, - { - "id": "dc43324f-cebe-456b-9067-37da49f1c8b7", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_6 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_6", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "a966197b-1177-45fa-9ed5-2443b335ab2d" - ] - ] - }, - { - "id": "b615640a-7e58-482e-a53a-74fd338043ab", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_6 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_6", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "be088eeb-4de8-4cdc-b4ca-1e94244bf6bb" - ], - [] - ] - }, - { - "id": "a966197b-1177-45fa-9ed5-2443b335ab2d", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Turn ON switch.interruptor_4_quarto_casal_interruptor_6", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_6" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "be088eeb-4de8-4cdc-b4ca-1e94244bf6bb", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "0ef04801-f331-4717-9d7c-1e7f27a0f7d3", - "name": "Turn OFF switch.interruptor_4_quarto_casal_interruptor_6", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_6" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_4_quarto_casal", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "88d36e37-7dd7-4a68-bdc5-d14a6480ff80", - "38101999-74a0-4430-b4ae-6b8a74ef06cc", - "ad7c070b-181a-4eb5-a9a9-6c1e2baee4cf", - "73aa168a-2f25-4255-b924-9655569dfce3", - "8bc44d28-1acd-4464-a196-4cc2bbb509e6", - "9f861266-fcc7-4e9a-a4f1-595b5b9c7211", - "ace50efc-71cf-4057-89eb-76e11a28ff98", - "e9e6c4ad-212a-4ad0-8238-2fc8aeaa2eb1", - "8fa7c01f-f857-49d8-9c57-1ee135495e69", - "0d9029b8-8ae4-44a0-95e9-02ad09fd1d1a", - "79bd690a-b57c-404c-a193-ca0cd29a8dac", - "0649dbe4-6732-45ae-9686-64753fc7ab19", - "2d536b9c-df10-4b01-95a8-d6a6f50cd3c5", - "de6a417d-f25a-4a68-841b-240f16fe2bbf", - "46fa41b1-93c9-42e8-8f08-c7d55748dd2b", - "169404be-e799-435c-80d7-a9cc08a99a71", - "03230363-f408-44e8-8aa3-805714c999bf", - "5c2b089e-26df-425e-9c52-f1869a536d19", - "7d0c5873-d8d2-4fc2-97f8-3e07d6a5fcdb", - "11bb427f-811d-44e5-aaad-8d36f11a5767" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "88d36e37-7dd7-4a68-bdc5-d14a6480ff80", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "switch.interruptor_4_quarto_casal_interruptor_4", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_4_quarto_casal_interruptor_4", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "38101999-74a0-4430-b4ae-6b8a74ef06cc" - ], - [ - "ad7c070b-181a-4eb5-a9a9-6c1e2baee4cf" - ] - ] - }, - { - "id": "38101999-74a0-4430-b4ae-6b8a74ef06cc", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "73aa168a-2f25-4255-b924-9655569dfce3" - ] - ] - }, - { - "id": "ad7c070b-181a-4eb5-a9a9-6c1e2baee4cf", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "8bc44d28-1acd-4464-a196-4cc2bbb509e6" - ], - [] - ] - }, - { - "id": "73aa168a-2f25-4255-b924-9655569dfce3", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn ON switch.interruptor_2_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "8bc44d28-1acd-4464-a196-4cc2bbb509e6", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn OFF switch.interruptor_2_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "9f861266-fcc7-4e9a-a4f1-595b5b9c7211", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "switch.interruptor_4_quarto_casal_interruptor_5", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_4_quarto_casal_interruptor_5", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "ace50efc-71cf-4057-89eb-76e11a28ff98" - ], - [ - "e9e6c4ad-212a-4ad0-8238-2fc8aeaa2eb1" - ] - ] - }, - { - "id": "ace50efc-71cf-4057-89eb-76e11a28ff98", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "8fa7c01f-f857-49d8-9c57-1ee135495e69" - ] - ] - }, - { - "id": "e9e6c4ad-212a-4ad0-8238-2fc8aeaa2eb1", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.interruptor_2_quarto_casal_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "0d9029b8-8ae4-44a0-95e9-02ad09fd1d1a" - ], - [] - ] - }, - { - "id": "8fa7c01f-f857-49d8-9c57-1ee135495e69", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn ON switch.interruptor_2_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "0d9029b8-8ae4-44a0-95e9-02ad09fd1d1a", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn OFF switch.interruptor_2_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "79bd690a-b57c-404c-a193-ca0cd29a8dac", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "switch.interruptor_4_quarto_casal_interruptor_6", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_4_quarto_casal_interruptor_6", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "0649dbe4-6732-45ae-9686-64753fc7ab19" - ], - [ - "2d536b9c-df10-4b01-95a8-d6a6f50cd3c5" - ] - ] - }, - { - "id": "0649dbe4-6732-45ae-9686-64753fc7ab19", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.interruptor_3_quarto_casal_interruptor_1 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_3_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "de6a417d-f25a-4a68-841b-240f16fe2bbf" - ] - ] - }, - { - "id": "2d536b9c-df10-4b01-95a8-d6a6f50cd3c5", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.interruptor_3_quarto_casal_interruptor_1 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_3_quarto_casal_interruptor_1", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "46fa41b1-93c9-42e8-8f08-c7d55748dd2b" - ], - [] - ] - }, - { - "id": "de6a417d-f25a-4a68-841b-240f16fe2bbf", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn ON switch.interruptor_3_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_3_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "46fa41b1-93c9-42e8-8f08-c7d55748dd2b", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn OFF switch.interruptor_3_quarto_casal_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_3_quarto_casal_interruptor_1" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "169404be-e799-435c-80d7-a9cc08a99a71", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "switch.interruptor_4_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_4_quarto_casal_interruptor_3", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "03230363-f408-44e8-8aa3-805714c999bf" - ], - [ - "5c2b089e-26df-425e-9c52-f1869a536d19" - ] - ] - }, - { - "id": "03230363-f408-44e8-8aa3-805714c999bf", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.tomada_1_quarto_casal_interruptor_2 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.tomada_1_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "7d0c5873-d8d2-4fc2-97f8-3e07d6a5fcdb" - ] - ] - }, - { - "id": "5c2b089e-26df-425e-9c52-f1869a536d19", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Check switch.tomada_1_quarto_casal_interruptor_2 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.tomada_1_quarto_casal_interruptor_2", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "11bb427f-811d-44e5-aaad-8d36f11a5767" - ], - [] - ] - }, - { - "id": "7d0c5873-d8d2-4fc2-97f8-3e07d6a5fcdb", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn ON switch.tomada_1_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.tomada_1_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "11bb427f-811d-44e5-aaad-8d36f11a5767", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "ffb1549e-bb24-401d-b8e1-729e0b5a6f6a", - "name": "Turn OFF switch.tomada_1_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.tomada_1_quarto_casal_interruptor_2" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "3dee0501-ec85-47d7-a69e-9247d24944f2", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "interruptor_1_cozinha", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "790e5c6a-564c-493c-ab70-9c01d11b1a34", - "50b33511-bcf7-4470-872a-3670350d02bd", - "a635c444-b2ef-46d1-ba4b-cb3b40ec8632", - "3b669506-5706-4390-a596-2b86bd7f778e", - "5b110ff7-03b0-436d-9bf4-e7651b2237ee" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "790e5c6a-564c-493c-ab70-9c01d11b1a34", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3dee0501-ec85-47d7-a69e-9247d24944f2", - "name": "switch.interruptor_1_cozinha_interruptor_1", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.interruptor_1_cozinha_interruptor_1", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "50b33511-bcf7-4470-872a-3670350d02bd" - ], - [ - "a635c444-b2ef-46d1-ba4b-cb3b40ec8632" - ] - ] - }, - { - "id": "50b33511-bcf7-4470-872a-3670350d02bd", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3dee0501-ec85-47d7-a69e-9247d24944f2", - "name": "Check switch.interruptor_2_cozinha_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "3b669506-5706-4390-a596-2b86bd7f778e" - ] - ] - }, - { - "id": "a635c444-b2ef-46d1-ba4b-cb3b40ec8632", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3dee0501-ec85-47d7-a69e-9247d24944f2", - "name": "Check switch.interruptor_2_cozinha_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_2_cozinha_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "5b110ff7-03b0-436d-9bf4-e7651b2237ee" - ], - [] - ] - }, - { - "id": "3b669506-5706-4390-a596-2b86bd7f778e", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3dee0501-ec85-47d7-a69e-9247d24944f2", - "name": "Turn ON switch.interruptor_2_cozinha_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "5b110ff7-03b0-436d-9bf4-e7651b2237ee", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "3dee0501-ec85-47d7-a69e-9247d24944f2", - "name": "Turn OFF switch.interruptor_2_cozinha_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_2_cozinha_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "f060640f-68a9-43ce-8460-d7a2bf0055a0", - "type": "group", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "name": "tomada_1_quarto_casal", - "style": { - "label": true, - "color": "#000000" - }, - "nodes": [ - "b49e63cb-e1c9-4c41-9cc4-76372c26fc96", - "a9ab2f13-cbda-4685-a4fc-3b8a9d67701c", - "7ecfe5c7-993b-4e73-abe1-f378917cbf7f", - "0336ff3d-cc1c-4170-a0ca-9116b8ab9d7b", - "52b3636c-df9d-47ff-823e-0457754b0ca0" - ], - "x": 153.5, - "y": 99, - "w": 1055.5, - "h": 319 - }, - { - "id": "b49e63cb-e1c9-4c41-9cc4-76372c26fc96", - "type": "server-state-changed", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "f060640f-68a9-43ce-8460-d7a2bf0055a0", - "name": "switch.tomada_1_quarto_casal_interruptor_2", - "server": "20b962a5.ede7ee", - "version": 5, - "outputs": 2, - "entityId": "switch.tomada_1_quarto_casal_interruptor_2", - "entityIdType": "exact", - "outputInitially": true, - "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": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 100, - "y": 100, - "wires": [ - [ - "a9ab2f13-cbda-4685-a4fc-3b8a9d67701c" - ], - [ - "7ecfe5c7-993b-4e73-abe1-f378917cbf7f" - ] - ] - }, - { - "id": "a9ab2f13-cbda-4685-a4fc-3b8a9d67701c", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "f060640f-68a9-43ce-8460-d7a2bf0055a0", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_3 ON", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 100, - "wires": [ - [], - [ - "0336ff3d-cc1c-4170-a0ca-9116b8ab9d7b" - ] - ] - }, - { - "id": "7ecfe5c7-993b-4e73-abe1-f378917cbf7f", - "type": "api-current-state", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "f060640f-68a9-43ce-8460-d7a2bf0055a0", - "name": "Check switch.interruptor_4_quarto_casal_interruptor_3 OFF", - "server": "20b962a5.ede7ee", - "version": 3, - "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.interruptor_4_quarto_casal_interruptor_3", - "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", - "override_topic": false, - "state_location": "payload", - "override_payload": "msg", - "entity_location": "data", - "override_data": "msg", - "x": 300, - "y": 180, - "wires": [ - [ - "52b3636c-df9d-47ff-823e-0457754b0ca0" - ], - [] - ] - }, - { - "id": "0336ff3d-cc1c-4170-a0ca-9116b8ab9d7b", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "f060640f-68a9-43ce-8460-d7a2bf0055a0", - "name": "Turn ON switch.interruptor_4_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "52b3636c-df9d-47ff-823e-0457754b0ca0", - "type": "api-call-service", - "z": "3e09b4fd-1f72-4eb8-8f48-9862e9073c0e", - "g": "f060640f-68a9-43ce-8460-d7a2bf0055a0", - "name": "Turn OFF switch.interruptor_4_quarto_casal_interruptor_3", - "server": "20b962a5.ede7ee", - "version": 5, - "domain": "switch", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "switch.interruptor_4_quarto_casal_interruptor_3" - ], - "data": "", - "dataType": "jsonata", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 500, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "20b962a5.ede7ee", - "type": "server", - "name": "Home Assistant", - "addon": true - } -] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 409784d..c0d8530 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ Flask requests pandas +pytest python-dotenv -PyYAML -ruamel.yaml \ No newline at end of file +PyYAML \ No newline at end of file diff --git a/tests/unit_tests/test_functions.py b/tests/unit_tests/test_functions.py new file mode 100644 index 0000000..baba62b --- /dev/null +++ b/tests/unit_tests/test_functions.py @@ -0,0 +1,69 @@ +# tests/unit_tests/test_functions.py + +import os +import pytest +import sys +import pandas as pd + +# Add the root directory of the project to the PYTHONPATH +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))) + +from scripts.check_mapping import read_mappings, analyze_mappings # noqa: E402 +from scripts.get_ha_devices_entities import read_configurations # noqa: E402 +from scripts.main import create_node_red_flow, read_mappings as read_main_mappings # noqa: E402 + + +@pytest.fixture(scope='module') +def mappings_file(): + return os.path.join(os.path.dirname(__file__), '../../mappings.csv') + + +@pytest.fixture(scope='module') +def config_file(): + return os.path.join(os.path.dirname(__file__), '../../config.yaml') + +@pytest.fixture(scope='module') +def devices_file(): + return os.path.join(os.path.dirname(__file__), '../../devices.csv') + +def test_devices_file(devices_file): + with open(devices_file, 'w') as f: + f.write('device,entity_id\n') + f.write('switch_1_kitchen,switch.switch_1_kitchen_button_1\n') + f.write('switch_1_room,switch.switch_1_room_button_1\n') + df = pd.read_csv(devices_file) + assert df.shape == (2, 2) + assert list(df.columns) == ['device', 'entity_id'] + assert df['device'].tolist() == ['switch_1_kitchen', 'switch_1_room'] + assert df['entity_id'].tolist() == ['switch.switch_1_kitchen_button_1', 'switch.switch_1_room_button_1'] + +def test_analyze_mappings(): + mappings = [ + ('switch_1_kitchen', 'switch.switch_1_kitchen_button_1', 'switch_1_room', 'switch.switch_1_room_button_1'), + ('switch_1_room', 'switch.switch_1_room_button_1', 'switch_1_kitchen', 'switch.switch_1_kitchen_button_1') + ] + missing_sources, missing_targets = analyze_mappings(mappings) + assert missing_sources == [] + assert missing_targets == [] + + +def test_read_configurations(config_file): + with open(config_file, 'w') as f: + f.write('home_assistant:\n home_assistant_url: "http://test-url"\n access_token: "test-token"\n') + config = read_configurations() + assert config['home_assistant']['home_assistant_url'] == 'http://test-url' + assert config['home_assistant']['access_token'] == 'test-token' + + +def test_create_node_red_flow(mappings_file): + with open(mappings_file, 'w') as f: + f.write('source_device,source_entity_id,target_device,target_entity_id\n') + f.write('switch_1_kitchen,switch.switch_1_kitchen_button_1,switch_1_room,switch.switch_1_room_button_1\n') + f.write('switch_1_room,switch.switch_1_room_button_1,switch_1_kitchen,switch.switch_1_kitchen_button_1\n') + mappings = read_main_mappings(mappings_file) + flow = create_node_red_flow(mappings) + assert isinstance(flow, str) + assert 'switch_1_kitchen' in flow + assert 'switch.switch_1_kitchen_button_1' in flow + assert 'switch_1_room' in flow + assert 'switch.switch_1_room_button_1' in flow