Update flow files
This commit is contained in:
+249
-186
@@ -13,14 +13,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "10cbea6aaac127cd",
|
||||
"type": "tab",
|
||||
"label": "Balcony",
|
||||
"disabled": false,
|
||||
"info": "",
|
||||
"env": []
|
||||
},
|
||||
{
|
||||
"id": "c19dee9f.e72838",
|
||||
"type": "tab",
|
||||
@@ -3197,184 +3189,6 @@
|
||||
"x": 2340,
|
||||
"y": 720
|
||||
},
|
||||
{
|
||||
"id": "f3d66e8924f18806",
|
||||
"type": "server-state-changed",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Balcony Tradfri button",
|
||||
"wires": [
|
||||
[
|
||||
"f1e907e6ede24945"
|
||||
],
|
||||
[]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 6,
|
||||
"outputs": 2,
|
||||
"exposeAsEntityConfig": "",
|
||||
"entities": {
|
||||
"entity": [
|
||||
"sensor.balcony_light_switch_action"
|
||||
],
|
||||
"substring": [],
|
||||
"regex": []
|
||||
},
|
||||
"outputInitially": false,
|
||||
"stateType": "str",
|
||||
"ifState": "on",
|
||||
"ifStateType": "str",
|
||||
"ifStateOperator": "is",
|
||||
"outputOnlyOnStateChange": true,
|
||||
"for": 0,
|
||||
"forType": "num",
|
||||
"forUnits": "minutes",
|
||||
"ignorePrevStateNull": false,
|
||||
"ignorePrevStateUnknown": false,
|
||||
"ignorePrevStateUnavailable": false,
|
||||
"ignoreCurrentStateUnknown": true,
|
||||
"ignoreCurrentStateUnavailable": true,
|
||||
"outputProperties": [
|
||||
{
|
||||
"property": "payload",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "entityState"
|
||||
},
|
||||
{
|
||||
"property": "data",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "eventData"
|
||||
},
|
||||
{
|
||||
"property": "topic",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "triggerId"
|
||||
}
|
||||
],
|
||||
"x": 180,
|
||||
"y": 140
|
||||
},
|
||||
{
|
||||
"id": "9412a727b1cbef12",
|
||||
"type": "comment",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Balcony light control",
|
||||
"wires": [],
|
||||
"info": "",
|
||||
"x": 170,
|
||||
"y": 100
|
||||
},
|
||||
{
|
||||
"id": "f1e907e6ede24945",
|
||||
"type": "api-current-state",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Balcony Lights On?",
|
||||
"wires": [
|
||||
[
|
||||
"199c4827dec86225"
|
||||
],
|
||||
[
|
||||
"a29b4c78a44241b6"
|
||||
]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 3,
|
||||
"outputs": 2,
|
||||
"halt_if": "on",
|
||||
"halt_if_type": "str",
|
||||
"halt_if_compare": "is",
|
||||
"entity_id": "light.outdoor_light_string",
|
||||
"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": 510,
|
||||
"y": 140
|
||||
},
|
||||
{
|
||||
"id": "a29b4c78a44241b6",
|
||||
"type": "api-call-service",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Turn on balcony lights",
|
||||
"wires": [
|
||||
[]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 7,
|
||||
"debugenabled": true,
|
||||
"action": "light.turn_on",
|
||||
"floorId": [],
|
||||
"areaId": [
|
||||
"balcony"
|
||||
],
|
||||
"deviceId": [],
|
||||
"entityId": [],
|
||||
"labelId": [],
|
||||
"data": "",
|
||||
"dataType": "json",
|
||||
"mergeContext": "",
|
||||
"mustacheAltTags": false,
|
||||
"outputProperties": [],
|
||||
"queue": "none",
|
||||
"blockInputOverrides": false,
|
||||
"domain": "light",
|
||||
"service": "turn_on",
|
||||
"x": 860,
|
||||
"y": 160
|
||||
},
|
||||
{
|
||||
"id": "199c4827dec86225",
|
||||
"type": "api-call-service",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Turn of balcony lights",
|
||||
"wires": [
|
||||
[]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 7,
|
||||
"debugenabled": true,
|
||||
"action": "light.turn_off",
|
||||
"floorId": [],
|
||||
"areaId": [
|
||||
"balcony"
|
||||
],
|
||||
"deviceId": [],
|
||||
"entityId": [],
|
||||
"labelId": [],
|
||||
"data": "",
|
||||
"dataType": "json",
|
||||
"mergeContext": "",
|
||||
"mustacheAltTags": false,
|
||||
"outputProperties": [],
|
||||
"queue": "none",
|
||||
"blockInputOverrides": false,
|
||||
"domain": "light",
|
||||
"service": "turn_off",
|
||||
"x": 860,
|
||||
"y": 100
|
||||
},
|
||||
{
|
||||
"id": "1be4d360986fd1f1",
|
||||
"type": "server-state-changed",
|
||||
@@ -22984,5 +22798,254 @@
|
||||
"output_location_type": "none",
|
||||
"x": 660,
|
||||
"y": 1360
|
||||
},
|
||||
{
|
||||
"type": "tab",
|
||||
"label": "Balcony",
|
||||
"id": "10cbea6aaac127cd"
|
||||
},
|
||||
{
|
||||
"id": "f3d66e8924f18806",
|
||||
"type": "server-state-changed",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Balcony Tradfri button",
|
||||
"wires": [
|
||||
[
|
||||
"f1e907e6ede24945"
|
||||
],
|
||||
[]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 6,
|
||||
"outputs": 2,
|
||||
"exposeAsEntityConfig": "",
|
||||
"entities": {
|
||||
"entity": [
|
||||
"sensor.balcony_light_switch_action"
|
||||
],
|
||||
"substring": [],
|
||||
"regex": []
|
||||
},
|
||||
"outputInitially": false,
|
||||
"stateType": "str",
|
||||
"ifState": "on",
|
||||
"ifStateType": "str",
|
||||
"ifStateOperator": "is",
|
||||
"outputOnlyOnStateChange": true,
|
||||
"for": 0,
|
||||
"forType": "num",
|
||||
"forUnits": "minutes",
|
||||
"ignorePrevStateNull": false,
|
||||
"ignorePrevStateUnknown": false,
|
||||
"ignorePrevStateUnavailable": false,
|
||||
"ignoreCurrentStateUnknown": true,
|
||||
"ignoreCurrentStateUnavailable": true,
|
||||
"outputProperties": [
|
||||
{
|
||||
"property": "payload",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "entityState"
|
||||
},
|
||||
{
|
||||
"property": "data",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "eventData"
|
||||
},
|
||||
{
|
||||
"property": "topic",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "triggerId"
|
||||
}
|
||||
],
|
||||
"x": 180,
|
||||
"y": 140
|
||||
},
|
||||
{
|
||||
"id": "9412a727b1cbef12",
|
||||
"type": "comment",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Balcony light control",
|
||||
"wires": [],
|
||||
"info": "",
|
||||
"x": 170,
|
||||
"y": 100
|
||||
},
|
||||
{
|
||||
"id": "f1e907e6ede24945",
|
||||
"type": "api-current-state",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Balcony Lights On?",
|
||||
"wires": [
|
||||
[
|
||||
"199c4827dec86225"
|
||||
],
|
||||
[
|
||||
"a29b4c78a44241b6"
|
||||
]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 3,
|
||||
"outputs": 2,
|
||||
"halt_if": "on",
|
||||
"halt_if_type": "str",
|
||||
"halt_if_compare": "is",
|
||||
"entity_id": "light.outdoor_light_string",
|
||||
"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": 510,
|
||||
"y": 140
|
||||
},
|
||||
{
|
||||
"id": "a29b4c78a44241b6",
|
||||
"type": "api-call-service",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Turn on balcony lights",
|
||||
"wires": [
|
||||
[]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 7,
|
||||
"debugenabled": true,
|
||||
"action": "light.turn_on",
|
||||
"floorId": [],
|
||||
"areaId": [
|
||||
"balcony"
|
||||
],
|
||||
"deviceId": [],
|
||||
"entityId": [],
|
||||
"labelId": [],
|
||||
"data": "",
|
||||
"dataType": "json",
|
||||
"mergeContext": "",
|
||||
"mustacheAltTags": false,
|
||||
"outputProperties": [],
|
||||
"queue": "none",
|
||||
"blockInputOverrides": false,
|
||||
"domain": "light",
|
||||
"service": "turn_on",
|
||||
"x": 860,
|
||||
"y": 160
|
||||
},
|
||||
{
|
||||
"id": "199c4827dec86225",
|
||||
"type": "api-call-service",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Turn of balcony lights",
|
||||
"wires": [
|
||||
[]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 7,
|
||||
"debugenabled": true,
|
||||
"action": "light.turn_off",
|
||||
"floorId": [],
|
||||
"areaId": [
|
||||
"balcony"
|
||||
],
|
||||
"deviceId": [],
|
||||
"entityId": [],
|
||||
"labelId": [],
|
||||
"data": "",
|
||||
"dataType": "json",
|
||||
"mergeContext": "",
|
||||
"mustacheAltTags": false,
|
||||
"outputProperties": [],
|
||||
"queue": "none",
|
||||
"blockInputOverrides": false,
|
||||
"domain": "light",
|
||||
"service": "turn_off",
|
||||
"x": 860,
|
||||
"y": 100
|
||||
},
|
||||
{
|
||||
"id": "p2catch_bal",
|
||||
"type": "catch",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Catch all errors",
|
||||
"wires": [
|
||||
[
|
||||
"p2fmt_bal"
|
||||
]
|
||||
],
|
||||
"scope": null,
|
||||
"uncaught": false,
|
||||
"x": 160,
|
||||
"y": 360
|
||||
},
|
||||
{
|
||||
"id": "p2fmt_bal",
|
||||
"type": "function",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Format error",
|
||||
"wires": [
|
||||
[
|
||||
"p2ntfy_bal"
|
||||
]
|
||||
],
|
||||
"func": "const err = (msg.error && msg.error.message) ? msg.error.message : String(msg.payload || 'Unknown error');\nconst src = (msg.error && msg.error.source) ? (msg.error.source.name || msg.error.source.id || '') : '';\nmsg.payload = JSON.stringify({\n title: 'Node-RED Error: Balcony',\n message: err + (src ? '\\n\\nNode: ' + src : '')\n});\nreturn msg;",
|
||||
"outputs": 1,
|
||||
"noerr": 0,
|
||||
"initialize": "",
|
||||
"finalize": "",
|
||||
"libs": [],
|
||||
"timeout": "",
|
||||
"x": 400,
|
||||
"y": 360
|
||||
},
|
||||
{
|
||||
"id": "p2ntfy_bal",
|
||||
"type": "api-call-service",
|
||||
"z": "10cbea6aaac127cd",
|
||||
"name": "Notify error",
|
||||
"wires": [
|
||||
[]
|
||||
],
|
||||
"server": "657c7463.48e1e4",
|
||||
"version": 7,
|
||||
"debugenabled": false,
|
||||
"action": "notify.gotify_ha",
|
||||
"floorId": [],
|
||||
"areaId": [],
|
||||
"deviceId": [],
|
||||
"entityId": [],
|
||||
"labelId": [],
|
||||
"data": "{{{payload}}}",
|
||||
"dataType": "json",
|
||||
"mergeContext": "",
|
||||
"mustacheAltTags": false,
|
||||
"outputProperties": [],
|
||||
"queue": "none",
|
||||
"blockInputOverrides": false,
|
||||
"domain": "notify",
|
||||
"service": "gotify_ha",
|
||||
"output_location": "",
|
||||
"output_location_type": "none",
|
||||
"x": 660,
|
||||
"y": 360
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user