Skip to content

Commit

Permalink
Add catch all error
Browse files Browse the repository at this point in the history
  • Loading branch information
x-real-ip committed Aug 31, 2024
1 parent 5535072 commit 2c8b4d9
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 168 deletions.
39 changes: 9 additions & 30 deletions src/data/flows/automation_climate_graph_input_select_all.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
"1216fc8eb38d5547",
"344cbd55957359b6",
"3bb7516008d0f0ca",
"9e895cf92217d0d8",
"d96e500b8264b91c"
"0b536f63e5d6404e"
],
"x": 14,
"y": 39,
"w": 682,
"w": 502,
"h": 82
},
{
Expand All @@ -42,7 +41,7 @@
"links": [
"a97f87cfab413716"
],
"x": 655,
"x": 475,
"y": 80,
"wires": []
},
Expand All @@ -56,13 +55,13 @@
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "message: {{error.message}} \\nid: {{error.source.id}} \\nsource type: {{error.source.type}} \\nsource name: {{error.source.name}} \\nsource count: {{error.source.count}}",
"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": [
[
"9e895cf92217d0d8"
"0b536f63e5d6404e"
]
]
},
Expand Down Expand Up @@ -103,7 +102,7 @@
"outputLocation": "payload",
"outputResultsCount": 1,
"x": 430,
"y": 180,
"y": 160,
"wires": [
[
"caa9c954adc5c425"
Expand Down Expand Up @@ -135,7 +134,7 @@
"domain": "input_select",
"service": "select_option",
"x": 630,
"y": 180,
"y": 160,
"wires": [
[]
]
Expand Down Expand Up @@ -201,15 +200,15 @@
}
],
"x": 180,
"y": 180,
"y": 160,
"wires": [
[
"6c70289470244d20"
]
]
},
{
"id": "9e895cf92217d0d8",
"id": "0b536f63e5d6404e",
"type": "template",
"z": "1adcdebcdc8e5c39",
"g": "37ce07449a33a2f1",
Expand All @@ -222,26 +221,6 @@
"output": "str",
"x": 390,
"y": 80,
"wires": [
[
"d96e500b8264b91c"
]
]
},
{
"id": "d96e500b8264b91c",
"type": "template",
"z": "1adcdebcdc8e5c39",
"g": "37ce07449a33a2f1",
"name": "notification_id",
"field": "notify.notification_id",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "node-redError",
"output": "str",
"x": 540,
"y": 80,
"wires": [
[
"3bb7516008d0f0ca"
Expand Down
59 changes: 19 additions & 40 deletions src/data/flows/automation_doorbell.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"info": ""
},
{
"id": "b189508993904947",
"id": "6cb0ed1df40f98e6",
"type": "group",
"z": "3637eeb0.d96232",
"style": {
Expand All @@ -20,15 +20,14 @@
"color": "#a4a4a4"
},
"nodes": [
"ca96ab2b5ee83be0",
"1817757d44df9ab3",
"d9c305f5d3a90eeb",
"4b5032dba0ee7717",
"ac9e1209773b9b26"
"f0797db4a3658338",
"e45eced2a30f126b",
"b678056d1b96f637",
"a42a1f5ee71e92aa"
],
"x": 14,
"y": 39,
"w": 682,
"w": 502,
"h": 82
},
{
Expand Down Expand Up @@ -481,60 +480,60 @@
"wires": []
},
{
"id": "ca96ab2b5ee83be0",
"id": "f0797db4a3658338",
"type": "catch",
"z": "3637eeb0.d96232",
"g": "b189508993904947",
"g": "6cb0ed1df40f98e6",
"name": "",
"scope": null,
"uncaught": false,
"x": 100,
"y": 80,
"wires": [
[
"1817757d44df9ab3"
"e45eced2a30f126b"
]
]
},
{
"id": "1817757d44df9ab3",
"id": "e45eced2a30f126b",
"type": "template",
"z": "3637eeb0.d96232",
"g": "b189508993904947",
"g": "6cb0ed1df40f98e6",
"name": "messsage",
"field": "notify.message",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "message: {{error.message}} \\nid: {{error.source.id}} \\nsource type: {{error.source.type}} \\nsource name: {{error.source.name}} \\nsource count: {{error.source.count}}",
"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": [
[
"4b5032dba0ee7717"
"a42a1f5ee71e92aa"
]
]
},
{
"id": "d9c305f5d3a90eeb",
"id": "b678056d1b96f637",
"type": "link out",
"z": "3637eeb0.d96232",
"g": "b189508993904947",
"g": "6cb0ed1df40f98e6",
"name": "link_out_notify_1",
"mode": "link",
"links": [
"a97f87cfab413716"
],
"x": 655,
"x": 475,
"y": 80,
"wires": []
},
{
"id": "4b5032dba0ee7717",
"id": "a42a1f5ee71e92aa",
"type": "template",
"z": "3637eeb0.d96232",
"g": "b189508993904947",
"g": "6cb0ed1df40f98e6",
"name": "title",
"field": "notify.title",
"fieldType": "msg",
Expand All @@ -546,27 +545,7 @@
"y": 80,
"wires": [
[
"ac9e1209773b9b26"
]
]
},
{
"id": "ac9e1209773b9b26",
"type": "template",
"z": "3637eeb0.d96232",
"g": "b189508993904947",
"name": "notification_id",
"field": "notify.notification_id",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "node-redError",
"output": "str",
"x": 540,
"y": 80,
"wires": [
[
"d9c305f5d3a90eeb"
"b678056d1b96f637"
]
]
},
Expand Down
59 changes: 19 additions & 40 deletions src/data/flows/automation_guest_mode.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"h": 202
},
{
"id": "4f86984d460992be",
"id": "b7026e569408bfbd",
"type": "group",
"z": "a7a34028d045deee",
"style": {
Expand All @@ -43,15 +43,14 @@
"color": "#a4a4a4"
},
"nodes": [
"ba5653ac894301a8",
"7c26e11fb0a5675f",
"62b89b4d22151b49",
"236793ad1c6b6c2c",
"d0de465de76db1d1"
"bed74da982aa647e",
"3749b4ab1a0ba7cf",
"6c4b4ca33c32a0f7",
"cd802d99b317e8c3"
],
"x": 14,
"y": 39,
"w": 682,
"w": 502,
"h": 82
},
{
Expand Down Expand Up @@ -859,60 +858,60 @@
]
},
{
"id": "ba5653ac894301a8",
"id": "bed74da982aa647e",
"type": "catch",
"z": "a7a34028d045deee",
"g": "4f86984d460992be",
"g": "b7026e569408bfbd",
"name": "",
"scope": null,
"uncaught": false,
"x": 100,
"y": 80,
"wires": [
[
"7c26e11fb0a5675f"
"3749b4ab1a0ba7cf"
]
]
},
{
"id": "7c26e11fb0a5675f",
"id": "3749b4ab1a0ba7cf",
"type": "template",
"z": "a7a34028d045deee",
"g": "4f86984d460992be",
"g": "b7026e569408bfbd",
"name": "messsage",
"field": "notify.message",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "message: {{error.message}} \\nid: {{error.source.id}} \\nsource type: {{error.source.type}} \\nsource name: {{error.source.name}} \\nsource count: {{error.source.count}}",
"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": [
[
"236793ad1c6b6c2c"
"cd802d99b317e8c3"
]
]
},
{
"id": "62b89b4d22151b49",
"id": "6c4b4ca33c32a0f7",
"type": "link out",
"z": "a7a34028d045deee",
"g": "4f86984d460992be",
"g": "b7026e569408bfbd",
"name": "link_out_notify_1",
"mode": "link",
"links": [
"a97f87cfab413716"
],
"x": 655,
"x": 475,
"y": 80,
"wires": []
},
{
"id": "236793ad1c6b6c2c",
"id": "cd802d99b317e8c3",
"type": "template",
"z": "a7a34028d045deee",
"g": "4f86984d460992be",
"g": "b7026e569408bfbd",
"name": "title",
"field": "notify.title",
"fieldType": "msg",
Expand All @@ -924,27 +923,7 @@
"y": 80,
"wires": [
[
"d0de465de76db1d1"
]
]
},
{
"id": "d0de465de76db1d1",
"type": "template",
"z": "a7a34028d045deee",
"g": "4f86984d460992be",
"name": "notification_id",
"field": "notify.notification_id",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "node-redError",
"output": "str",
"x": 540,
"y": 80,
"wires": [
[
"62b89b4d22151b49"
"6c4b4ca33c32a0f7"
]
]
},
Expand Down
Loading

0 comments on commit 2c8b4d9

Please sign in to comment.