From ca0bd9615353401380b636ae9e9d9b0f6148c182 Mon Sep 17 00:00:00 2001 From: theautomation Date: Sat, 13 Jan 2024 19:39:26 +0100 Subject: [PATCH] Add vacuum notification flow #21 --- src/data/flows/notification_vacuum.json | 410 ++++++++++++++++++++++++ 1 file changed, 410 insertions(+) create mode 100644 src/data/flows/notification_vacuum.json diff --git a/src/data/flows/notification_vacuum.json b/src/data/flows/notification_vacuum.json new file mode 100644 index 0000000..afbc96c --- /dev/null +++ b/src/data/flows/notification_vacuum.json @@ -0,0 +1,410 @@ +[ + { + "id": "8d2de69b4c0fd2b9", + "type": "tab", + "label": "notification_vacuum", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "bb1cc6878bf6f696", + "type": "group", + "z": "8d2de69b4c0fd2b9", + "name": "notify", + "style": { + "label": true + }, + "nodes": [ + "db50c5b6f4f302b4", + "c0d0c36d39f527e2", + "372e878f27b4b2b2", + "344ad3f982a92730", + "ece5442438bb7aa1", + "b560dfc6f3c2aec1" + ], + "x": 1294, + "y": 19, + "w": 472, + "h": 162 + }, + { + "id": "ece5442438bb7aa1", + "type": "junction", + "z": "8d2de69b4c0fd2b9", + "g": "bb1cc6878bf6f696", + "x": 1320, + "y": 80, + "wires": [ + [ + "c0d0c36d39f527e2", + "db50c5b6f4f302b4", + "b560dfc6f3c2aec1" + ] + ] + }, + { + "id": "bb86ef9c9939267f", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "name": "message", + "field": "notify.message", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "{{data.new_state.attributes.friendly_name}} zit vast en heeft hulp nodig.", + "output": "str", + "x": 400, + "y": 80, + "wires": [ + [ + "ece5442438bb7aa1", + "9920356dd5442dce" + ] + ] + }, + { + "id": "c3ad9439a04e7919", + "type": "server-state-changed", + "z": "8d2de69b4c0fd2b9", + "name": "vacuum State is error s6", + "server": "4ba92433.2478cc", + "version": 5, + "outputs": 2, + "exposeAsEntityConfig": "", + "entityId": "vacuum.roborock_s6_pure", + "entityIdType": "exact", + "outputInitially": true, + "stateType": "str", + "ifState": "error", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": "", + "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": 150, + "y": 80, + "wires": [ + [ + "bb86ef9c9939267f" + ], + [] + ] + }, + { + "id": "b0a13a597c951a5c", + "type": "server-state-changed", + "z": "8d2de69b4c0fd2b9", + "name": "vacuum State is error s55", + "server": "4ba92433.2478cc", + "version": 5, + "outputs": 2, + "exposeAsEntityConfig": "", + "entityId": "vacuum.robot_vacuum", + "entityIdType": "exact", + "outputInitially": true, + "stateType": "str", + "ifState": "error", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": "", + "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": 150, + "y": 140, + "wires": [ + [ + "bb86ef9c9939267f" + ], + [] + ] + }, + { + "id": "101fccbd23bc3737", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "name": "secondary information", + "field": "secondary_information", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "{{notify.message}}", + "output": "str", + "x": 820, + "y": 240, + "wires": [ + [ + "1a142df2188365f9" + ] + ] + }, + { + "id": "1a142df2188365f9", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "name": "primary information", + "field": "primary_information", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "KNMI Waarschuwing", + "output": "str", + "x": 1030, + "y": 240, + "wires": [ + [ + "ef723bf3c094067c" + ] + ] + }, + { + "id": "ef723bf3c094067c", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "name": "topic", + "field": "topic", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "weather", + "output": "str", + "x": 1190, + "y": 240, + "wires": [ + [ + "a38dcb88665ba1b0" + ] + ] + }, + { + "id": "a38dcb88665ba1b0", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "name": "notification_level", + "field": "notification_level", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "warning", + "output": "str", + "x": 1350, + "y": 240, + "wires": [ + [ + "4705f09e38185adf" + ] + ] + }, + { + "id": "4705f09e38185adf", + "type": "link out", + "z": "8d2de69b4c0fd2b9", + "name": "notification", + "mode": "link", + "links": [ + "60e14e33a793f50d" + ], + "x": 1475, + "y": 240, + "wires": [] + }, + { + "id": "db50c5b6f4f302b4", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "g": "bb1cc6878bf6f696", + "name": "icon", + "field": "notify.icon", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "", + "output": "str", + "x": 1430, + "y": 100, + "wires": [ + [ + "344ad3f982a92730" + ] + ] + }, + { + "id": "c0d0c36d39f527e2", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "g": "bb1cc6878bf6f696", + "name": "title", + "field": "notify.title", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Stofzuiger", + "output": "str", + "x": 1430, + "y": 60, + "wires": [ + [ + "344ad3f982a92730" + ] + ] + }, + { + "id": "372e878f27b4b2b2", + "type": "link out", + "z": "8d2de69b4c0fd2b9", + "g": "bb1cc6878bf6f696", + "name": "link_out_notify_basement_ventilation", + "mode": "link", + "links": [ + "8ed3b0974336e55b", + "aeee8468f3d1b7ad", + "c4660dc11fb0e5b8" + ], + "x": 1725, + "y": 120, + "wires": [] + }, + { + "id": "344ad3f982a92730", + "type": "join", + "z": "8d2de69b4c0fd2b9", + "g": "bb1cc6878bf6f696", + "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": 1630, + "y": 120, + "wires": [ + [ + "372e878f27b4b2b2" + ] + ] + }, + { + "id": "b560dfc6f3c2aec1", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "g": "bb1cc6878bf6f696", + "name": "notification id", + "field": "notify.notification_id", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "vacuum", + "output": "str", + "x": 1450, + "y": 140, + "wires": [ + [ + "344ad3f982a92730" + ] + ] + }, + { + "id": "9920356dd5442dce", + "type": "template", + "z": "8d2de69b4c0fd2b9", + "name": "icon", + "field": "icon", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "mdi:robot-vacuum", + "output": "str", + "x": 650, + "y": 240, + "wires": [ + [ + "101fccbd23bc3737" + ] + ] + }, + { + "id": "4ba92433.2478cc", + "type": "server", + "name": "Home Assistant", + "version": 5, + "addon": false, + "rejectUnauthorizedCerts": false, + "ha_boolean": "y|yes|true|on|home|open", + "connectionDelay": true, + "cacheJson": true, + "heartbeat": true, + "heartbeatInterval": "30", + "areaSelector": "id", + "deviceSelector": "id", + "entitySelector": "id", + "statusSeparator": "at: ", + "statusYear": "hidden", + "statusMonth": "short", + "statusDay": "numeric", + "statusHourCycle": "h23", + "statusTimeFormat": "h:m", + "enableGlobalContextStore": true + } +] \ No newline at end of file