Skip to content

Commit

Permalink
Close #71 Vacuum batterij notification has no percentage symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
x-real-ip committed Aug 31, 2024
1 parent aca0e59 commit 9215e6f
Show file tree
Hide file tree
Showing 3 changed files with 436 additions and 86 deletions.
5 changes: 2 additions & 3 deletions src/data/flows/notification_main.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@
"6031ed8d02da2add",
"ce9dcc40d72369f4",
"31afe4007c8c4380",
"aa6339118c6cf238",
"5173344f2bf9202f",
"a88aa9f85b115b03"
"f9b220def47837e4",
"17e4e7721adc09a1"
],
"x": 195,
"y": 460,
Expand Down
229 changes: 202 additions & 27 deletions src/data/flows/notification_vacuum_s55_low_battery.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,47 @@
"info": "",
"env": []
},
{
"id": "b4f3f9f25b585f85",
"type": "group",
"z": "ce5dca27239daba8",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"2e9dbc5a5fc615fc",
"b437f9f1e8b5ebf7",
"f9b220def47837e4",
"2a1761aff5d63d7a"
],
"x": 14,
"y": 39,
"w": 502,
"h": 82
},
{
"id": "ea460771e1472df3",
"type": "trigger-state",
"z": "ce5dca27239daba8",
"name": "",
"server": "4ba92433.2478cc",
"version": 4,
"version": 5,
"inputs": 0,
"outputs": 2,
"exposeAsEntityConfig": "",
"entityId": "vacuum.robot_vacuum",
"entityIdType": "exact",
"entities": {
"entity": [
"vacuum.robot_vacuum"
],
"substring": [],
"regex": []
},
"debugEnabled": false,
"constraints": [
{
Expand All @@ -36,11 +65,11 @@
"stateType": "str",
"enableInput": false,
"x": 160,
"y": 60,
"y": 160,
"wires": [
[
"04cada4367386b36",
"58e0becbd6d919d0"
"58e0becbd6d919d0",
"c07bdaa6ded33de2"
],
[]
]
Expand All @@ -64,8 +93,8 @@
"from": "",
"to": "",
"reg": false,
"x": 640,
"y": 60,
"x": 940,
"y": 160,
"wires": [
[
"d2a6c270b5a78137"
Expand All @@ -89,8 +118,8 @@
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 440,
"y": 60,
"x": 740,
"y": 160,
"wires": [
[
"8963892cb65d8713"
Expand All @@ -116,10 +145,12 @@
"from": "",
"to": "",
"reg": false,
"x": 640,
"y": 100,
"x": 620,
"y": 220,
"wires": [
[]
[
"40a58eddf78206e8"
]
]
},
{
Expand All @@ -140,7 +171,7 @@
"repair": false,
"outputs": 1,
"x": 430,
"y": 100,
"y": 220,
"wires": [
[
"57ab0afd4c173998"
Expand All @@ -166,8 +197,8 @@
"links": [
"60e14e33a793f50d"
],
"x": 1655,
"y": 60,
"x": 1955,
"y": 160,
"wires": []
},
{
Expand All @@ -189,8 +220,8 @@
"from": "",
"to": "",
"reg": false,
"x": 1560,
"y": 60,
"x": 1860,
"y": 160,
"wires": [
[
"a9aa3ff08dd7532c"
Expand All @@ -208,8 +239,8 @@
"syntax": "mustache",
"template": "warning",
"output": "str",
"x": 1390,
"y": 60,
"x": 1690,
"y": 160,
"wires": [
[
"03d5ea897e7d84ee"
Expand All @@ -227,8 +258,8 @@
"syntax": "mustache",
"template": "battery",
"output": "str",
"x": 1230,
"y": 60,
"x": 1530,
"y": 160,
"wires": [
[
"2792f3a94c8f1651"
Expand All @@ -246,8 +277,8 @@
"syntax": "mustache",
"template": "Batterij",
"output": "str",
"x": 1070,
"y": 60,
"x": 1370,
"y": 160,
"wires": [
[
"9174dfc0fa90a687"
Expand All @@ -263,16 +294,160 @@
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "Let op, Stofzuiger {{data.event.new_state.attributes.friendly_name}} heeft een batterij niveau van {{data.event.new_state.attributes.battery_level}} controleer de docking station.",
"template": "Let op, Stofzuiger {{data.event.new_state.attributes.friendly_name}} heeft een batterij niveau van {{data.event.new_state.attributes.battery_level}}% controleer de docking station.",
"output": "str",
"x": 860,
"y": 60,
"x": 1160,
"y": 160,
"wires": [
[
"8e69bb39390a2edf"
]
]
},
{
"id": "c07bdaa6ded33de2",
"type": "change",
"z": "ce5dca27239daba8",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "low_battery",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 160,
"wires": [
[
"6c50fe3336fa87c8"
]
]
},
{
"id": "6c50fe3336fa87c8",
"type": "rbe",
"z": "ce5dca27239daba8",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": false,
"property": "payload",
"topi": "topic",
"x": 590,
"y": 160,
"wires": [
[
"04cada4367386b36"
]
]
},
{
"id": "40a58eddf78206e8",
"type": "change",
"z": "ce5dca27239daba8",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "charging",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 820,
"y": 220,
"wires": [
[
"c07bdaa6ded33de2"
]
]
},
{
"id": "2e9dbc5a5fc615fc",
"type": "catch",
"z": "ce5dca27239daba8",
"g": "b4f3f9f25b585f85",
"name": "",
"scope": null,
"uncaught": false,
"x": 100,
"y": 80,
"wires": [
[
"b437f9f1e8b5ebf7"
]
]
},
{
"id": "b437f9f1e8b5ebf7",
"type": "template",
"z": "ce5dca27239daba8",
"g": "b4f3f9f25b585f85",
"name": "messsage",
"field": "notify.message",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "message: {{{error.message}}} \\nSource: id: {{error.source.id}} \\ntype: {{error.source.type}} \\nname: {{error.source.name}} \\ncount: {{error.source.count}}",
"output": "str",
"x": 250,
"y": 80,
"wires": [
[
"2a1761aff5d63d7a"
]
]
},
{
"id": "f9b220def47837e4",
"type": "link out",
"z": "ce5dca27239daba8",
"g": "b4f3f9f25b585f85",
"name": "link_out_notify_1",
"mode": "link",
"links": [
"a97f87cfab413716"
],
"x": 475,
"y": 80,
"wires": []
},
{
"id": "2a1761aff5d63d7a",
"type": "template",
"z": "ce5dca27239daba8",
"g": "b4f3f9f25b585f85",
"name": "title",
"field": "notify.title",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "Node-RED",
"output": "str",
"x": 390,
"y": 80,
"wires": [
[
"f9b220def47837e4"
]
]
},
{
"id": "4ba92433.2478cc",
"type": "server",
Expand Down
Loading

0 comments on commit 9215e6f

Please sign in to comment.