From 7318911ada547d5a0b98d43495cffe05bf7dde54 Mon Sep 17 00:00:00 2001 From: theautomation Date: Thu, 8 Feb 2024 21:14:47 +0100 Subject: [PATCH] Change panel off when above energy 0 --- src/data/flows/automation_infrared_panel.json | 276 +++++++++--------- 1 file changed, 138 insertions(+), 138 deletions(-) diff --git a/src/data/flows/automation_infrared_panel.json b/src/data/flows/automation_infrared_panel.json index 2f9b22e..ef9126b 100644 --- a/src/data/flows/automation_infrared_panel.json +++ b/src/data/flows/automation_infrared_panel.json @@ -24,9 +24,9 @@ "87b3630fa6681255", "b334886da3d39e67" ], - "x": 1234, - "y": 39, - "w": 472, + "x": 1254, + "y": 19, + "w": 452, "h": 202 }, { @@ -34,8 +34,8 @@ "type": "junction", "z": "d7c35c04cc0c5b68", "g": "36dc1da28ea112aa", - "x": 1260, - "y": 100, + "x": 1280, + "y": 60, "wires": [ [ "51bb0a67f9282d5f", @@ -45,6 +45,129 @@ ] ] }, + { + "id": "b334886da3d39e67", + "type": "template", + "z": "d7c35c04cc0c5b68", + "g": "36dc1da28ea112aa", + "name": "message", + "field": "notify.message", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Het Infrarood paneel in de souterrain stond nog aan en is nu automatisch uitgeschakeld", + "output": "str", + "x": 1380, + "y": 180, + "wires": [ + [ + "98c964aa61c96938" + ] + ] + }, + { + "id": "87b3630fa6681255", + "type": "template", + "z": "d7c35c04cc0c5b68", + "g": "36dc1da28ea112aa", + "name": "notification id", + "field": "notify.notification_id", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "infrared_panel", + "output": "str", + "x": 1390, + "y": 140, + "wires": [ + [ + "98c964aa61c96938" + ] + ] + }, + { + "id": "98c964aa61c96938", + "type": "join", + "z": "d7c35c04cc0c5b68", + "g": "36dc1da28ea112aa", + "name": "", + "mode": "custom", + "build": "merged", + "property": "notify", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "4", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 1570, + "y": 120, + "wires": [ + [ + "dfe89d053727bf74" + ] + ] + }, + { + "id": "dfe89d053727bf74", + "type": "link out", + "z": "d7c35c04cc0c5b68", + "g": "36dc1da28ea112aa", + "name": "link_out_notify_infrared_panel", + "mode": "link", + "links": [ + "8ed3b0974336e55b" + ], + "x": 1665, + "y": 120, + "wires": [] + }, + { + "id": "51bb0a67f9282d5f", + "type": "template", + "z": "d7c35c04cc0c5b68", + "g": "36dc1da28ea112aa", + "name": "title", + "field": "notify.title", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Infrarood paneel", + "output": "str", + "x": 1370, + "y": 60, + "wires": [ + [ + "98c964aa61c96938" + ] + ] + }, + { + "id": "8f7ef08c7aea9511", + "type": "template", + "z": "d7c35c04cc0c5b68", + "g": "36dc1da28ea112aa", + "name": "icon", + "field": "notify.icon", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "", + "output": "str", + "x": 1370, + "y": 100, + "wires": [ + [ + "98c964aa61c96938" + ] + ] + }, { "id": "0eb4e43996470004", "type": "cronplus", @@ -93,15 +216,15 @@ "id": "4c51a48e529813e3", "type": "api-current-state", "z": "d7c35c04cc0c5b68", - "name": "shellyplug infrared panel is on", + "name": "shellyplug infrared panel energy is > 0", "server": "4ba92433.2478cc", "version": 3, "outputs": 2, - "halt_if": "on", - "halt_if_type": "str", - "halt_if_compare": "is", - "entity_id": "switch.shellyplugplus_infraredpanel_switch_0", - "state_type": "str", + "halt_if": "0", + "halt_if_type": "num", + "halt_if_compare": "gt", + "entity_id": "sensor.shellyplugplus_infraredpanel_switch_0_power", + "state_type": "num", "blockInputOverrides": false, "outputProperties": [ { @@ -125,7 +248,7 @@ "override_payload": "msg", "entity_location": "data", "override_data": "msg", - "x": 350, + "x": 370, "y": 60, "wires": [ [ @@ -155,7 +278,7 @@ "mustacheAltTags": false, "outputProperties": [], "queue": "none", - "x": 630, + "x": 670, "y": 60, "wires": [ [ @@ -180,7 +303,7 @@ "drop": false, "allowrate": false, "outputs": 1, - "x": 840, + "x": 880, "y": 60, "wires": [ [ @@ -209,7 +332,7 @@ "mustacheAltTags": false, "outputProperties": [], "queue": "none", - "x": 1050, + "x": 1090, "y": 60, "wires": [ [ @@ -217,129 +340,6 @@ ] ] }, - { - "id": "8f7ef08c7aea9511", - "type": "template", - "z": "d7c35c04cc0c5b68", - "g": "36dc1da28ea112aa", - "name": "icon", - "field": "notify.icon", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "", - "output": "str", - "x": 1370, - "y": 120, - "wires": [ - [ - "98c964aa61c96938" - ] - ] - }, - { - "id": "51bb0a67f9282d5f", - "type": "template", - "z": "d7c35c04cc0c5b68", - "g": "36dc1da28ea112aa", - "name": "title", - "field": "notify.title", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "Infrarood paneel", - "output": "str", - "x": 1370, - "y": 80, - "wires": [ - [ - "98c964aa61c96938" - ] - ] - }, - { - "id": "dfe89d053727bf74", - "type": "link out", - "z": "d7c35c04cc0c5b68", - "g": "36dc1da28ea112aa", - "name": "link_out_notify_infrared_panel", - "mode": "link", - "links": [ - "8ed3b0974336e55b" - ], - "x": 1665, - "y": 140, - "wires": [] - }, - { - "id": "98c964aa61c96938", - "type": "join", - "z": "d7c35c04cc0c5b68", - "g": "36dc1da28ea112aa", - "name": "", - "mode": "custom", - "build": "merged", - "property": "notify", - "propertyType": "msg", - "key": "topic", - "joiner": "\\n", - "joinerType": "str", - "accumulate": false, - "timeout": "", - "count": "4", - "reduceRight": false, - "reduceExp": "", - "reduceInit": "", - "reduceInitType": "", - "reduceFixup": "", - "x": 1570, - "y": 140, - "wires": [ - [ - "dfe89d053727bf74" - ] - ] - }, - { - "id": "87b3630fa6681255", - "type": "template", - "z": "d7c35c04cc0c5b68", - "g": "36dc1da28ea112aa", - "name": "notification id", - "field": "notify.notification_id", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "infrared_panel", - "output": "str", - "x": 1390, - "y": 160, - "wires": [ - [ - "98c964aa61c96938" - ] - ] - }, - { - "id": "b334886da3d39e67", - "type": "template", - "z": "d7c35c04cc0c5b68", - "g": "36dc1da28ea112aa", - "name": "message", - "field": "notify.message", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "Het Infrarood paneel in de souterrain stond nog aan en is nu automatisch uitgeschakeld", - "output": "str", - "x": 1380, - "y": 200, - "wires": [ - [ - "98c964aa61c96938" - ] - ] - }, { "id": "4ba92433.2478cc", "type": "server",