Created
January 16, 2022 22:03
-
-
Save UngluedChalice/d9b50b08c2a7fe7d67b39e91d1c3da8e to your computer and use it in GitHub Desktop.
Example Node Red Door Alert Notification for Home Assistant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "5c55b54cc1a56a0a", | |
"type": "server-state-changed", | |
"z": "9a9fa23ca7129bed", | |
"name": "Basement Door Open", | |
"server": "da064c2a.9cfc8", | |
"version": 3, | |
"exposeToHomeAssistant": false, | |
"haConfig": [ | |
{ | |
"property": "name", | |
"value": "" | |
}, | |
{ | |
"property": "icon", | |
"value": "" | |
} | |
], | |
"entityidfilter": "binary_sensor.basement_door_sensor", | |
"entityidfiltertype": "exact", | |
"outputinitially": false, | |
"state_type": "str", | |
"haltifstate": "on", | |
"halt_if_type": "str", | |
"halt_if_compare": "is", | |
"outputs": 2, | |
"output_only_on_state_change": true, | |
"for": 0, | |
"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": 160, | |
"y": 1760, | |
"wires": [ | |
[ | |
"48c41f02e146e827" | |
], | |
[] | |
] | |
}, | |
{ | |
"id": "48c41f02e146e827", | |
"type": "api-current-state", | |
"z": "9a9fa23ca7129bed", | |
"name": "Outside Door Alerts On?", | |
"server": "da064c2a.9cfc8", | |
"version": 3, | |
"outputs": 2, | |
"halt_if": "on", | |
"halt_if_type": "str", | |
"halt_if_compare": "is", | |
"entity_id": "input_boolean.outside_door_alerts", | |
"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": 470, | |
"y": 1760, | |
"wires": [ | |
[ | |
"cf14e4d04a94b06c" | |
], | |
[] | |
] | |
}, | |
{ | |
"id": "cf14e4d04a94b06c", | |
"type": "api-call-service", | |
"z": "9a9fa23ca7129bed", | |
"name": "Basement Door Opened (Critical)", | |
"server": "da064c2a.9cfc8", | |
"version": 3, | |
"debugenabled": true, | |
"service_domain": "notify", | |
"service": "iphone_group", | |
"entityId": "", | |
"data": "{\"title\":\"DOOR OPEN ALERT\",\"message\":\"Basement door just opened!\",\"data\":{\"push\":{\"sound\":{\"name\":\"default\",\"critical\":1,\"volume\":1}},\"actions\":[{\"action\":\"SILENCE_DOOR_ALERTS_30\",\"title\":\"Silence Door Alerts 30 min\",\"authenticationRequired\":\"false\",\"destructive\":0,\"icon\":\"sfsymbols:bell.slash\"},{\"action\":\"TURN_OUTSIDE_DOOR_ALERTS_OFF\",\"title\":\"Turn off outside door alerts\",\"authenticationRequired\":\"false\",\"destructive\":1,\"icon\":\"sfsymbols:bell.slash\"}]}}", | |
"dataType": "json", | |
"mergecontext": "", | |
"mustacheAltTags": false, | |
"outputProperties": [], | |
"queue": "none", | |
"x": 800, | |
"y": 1760, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "da064c2a.9cfc8", | |
"type": "server", | |
"name": "Home Assistant", | |
"addon": true | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment