Here’s my automation for open sensor notifications. I know there’s a way to pull the sensors directly from BWalarm, but I prefer this more visual representation.
Basically, I can specify whether the sensor notifies me when arming “away” or “home” separately.
It then checks the status of a particular sensor.
The function node formats the message, pulling the sensor name from the previous state node.
Finally, there’s a notify and TTS node.
[{"id":"9529988e.843498","type":"server-events","z":"5da73b18.815574","name":"Call Service Events","server":"b4442cdf.ce6f4","event_type":"call_service","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":170,"y":2180,"wires":[["f0c7c379.994d3"]]},{"id":"f0c7c379.994d3","type":"switch","z":"5da73b18.815574","name":"Alarm State","property":"payload.event.service","propertyType":"msg","rules":[{"t":"eq","v":"alarm_arm_away","vt":"str"},{"t":"eq","v":"alarm_arm_home","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":370,"y":2180,"wires":[["c99c2d79.3ab26","fe51b0e.a95475","c1c15248.8912f","ddd18552.49b758","268a1463.02673c","d1bfa8bd.355428","4eb554dc.df9adc","3fe69935.aeeeb6","cb381ae.2de41e8","a86490ff.1478a","fef95f5f.e8a5","42cb55a.18100ac"],["c99c2d79.3ab26","fe51b0e.a95475","c1c15248.8912f","ddd18552.49b758","d1bfa8bd.355428","4eb554dc.df9adc","3fe69935.aeeeb6","cb381ae.2de41e8","a86490ff.1478a","fef95f5f.e8a5","42cb55a.18100ac"]]},{"id":"c99c2d79.3ab26","type":"api-current-state","z":"5da73b18.815574","name":"Alfresco Door","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.alfresco_door","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":840,"y":1920,"wires":[["99ed4481.b9fa08"],[]]},{"id":"fe51b0e.a95475","type":"api-current-state","z":"5da73b18.815574","name":"Front Door","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.front_door","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":830,"y":1860,"wires":[["99ed4481.b9fa08"],[]]},{"id":"7ff291fe.415db","type":"comment","z":"5da73b18.815574","name":"Sensor Open Notifications","info":"","x":170,"y":1780,"wires":[]},{"id":"c1c15248.8912f","type":"api-current-state","z":"5da73b18.815574","name":"Garage External","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.garage_external_door","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":840,"y":1980,"wires":[["99ed4481.b9fa08"],[]]},{"id":"ddd18552.49b758","type":"api-current-state","z":"5da73b18.815574","name":"Laundry Door","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.laundry_door","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":840,"y":2100,"wires":[["99ed4481.b9fa08"],[]]},{"id":"268a1463.02673c","type":"api-current-state","z":"5da73b18.815574","name":"Garage Internal","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.garage_internal_door","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":840,"y":2040,"wires":[["99ed4481.b9fa08"],[]]},{"id":"d1bfa8bd.355428","type":"api-current-state","z":"5da73b18.815574","name":"Study Window","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.study_window","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":840,"y":2240,"wires":[["99ed4481.b9fa08"],[]]},{"id":"ee03f0eb.12ac4","type":"comment","z":"5da73b18.815574","name":"Doors","info":"","x":810,"y":1800,"wires":[]},{"id":"f96d35b7.d87058","type":"comment","z":"5da73b18.815574","name":"Windows","info":"","x":820,"y":2180,"wires":[]},{"id":"4eb554dc.df9adc","type":"api-current-state","z":"5da73b18.815574","name":"Living Room Window","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.living_room_window","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":860,"y":2300,"wires":[["99ed4481.b9fa08"],[]]},{"id":"3fe69935.aeeeb6","type":"api-current-state","z":"5da73b18.815574","name":"Dining Room Window","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.dining_room_window","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":860,"y":2360,"wires":[["99ed4481.b9fa08"],[]]},{"id":"cb381ae.2de41e8","type":"api-current-state","z":"5da73b18.815574","name":"Retreat Window","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.retreat_window","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":840,"y":2420,"wires":[["99ed4481.b9fa08"],[]]},{"id":"a86490ff.1478a","type":"api-current-state","z":"5da73b18.815574","name":"Bedroom 2 Window","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.bedroom_2_window","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":850,"y":2480,"wires":[["99ed4481.b9fa08"],[]]},{"id":"fef95f5f.e8a5","type":"api-current-state","z":"5da73b18.815574","name":"Bedroom 3 Window","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.bedroom_3_window","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":850,"y":2540,"wires":[["99ed4481.b9fa08"],[]]},{"id":"42cb55a.18100ac","type":"api-current-state","z":"5da73b18.815574","name":"Bathroom","server":"b4442cdf.ce6f4","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.bathroom_window","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":820,"y":2600,"wires":[["99ed4481.b9fa08"],[]]},{"id":"99ed4481.b9fa08","type":"function","z":"5da73b18.815574","name":"Message","func":"var sensorname = msg.data.attributes.friendly_name\nmsg.message =\n{\n \"message\": \"Unable to Arm. \" + sensorname + \" Open.\" \n }\nreturn msg;\n\n","outputs":1,"noerr":0,"x":1160,"y":2200,"wires":[["de529b2b.c691b8","406924bc.9b067c"]]},{"id":"406924bc.9b067c","type":"api-call-service","z":"5da73b18.815574","name":"TTS","server":"b4442cdf.ce6f4","version":1,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.entryway_speaker","data":"{\"message\":\"{{message.message}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1370,"y":2240,"wires":[[]]},{"id":"de529b2b.c691b8","type":"api-call-service","z":"5da73b18.815574","name":"Notify","server":"b4442cdf.ce6f4","version":1,"debugenabled":false,"service_domain":"notify","service":"notify","entityId":"","data":"{\"title\":\"ALARM\",\"message\":\"{{message.message}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1370,"y":2160,"wires":[[]]},{"id":"b4442cdf.ce6f4","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]