You just use the start or end actions and input your telegram notification in there.
Blacky
You just use the start or end actions and input your telegram notification in there.
Blacky
@Blacky
Can this blueprint be used to notify me when a device becomes unavaible?
Do I need to include all my devices one by one or is there a group name like you have with battery operated devices?
I have smart plugs, sensors for door/window, smart bulbs, push buttons etcā¦
And can it be used as a alarm system when smoke detector or door is opened when not at home?
Yes but unlike the battery blueprint you will not know what one has become unavailable so once notified you will have to search for it. You have to add every entity you would like to monitor. Please make sure you spell āunavailableā correctly.
Have a look at āAlarmoā, I donāt use this integration but I know a lot of people use it and looks to be well supported with good reviews so you may want to take a look at it.
Hope this helps you.
Blacky
Hi there,
Iām trying to see if I can use this to notify my wife and my phone upon completion of a timer. If possible to clear the notification from each otherās phone if either of us dismiss it.
I have a timer helper setup. Must I use the event bus and āfinishedā as the trigger, or is there another good way to accomplish this.
In this blueprint it allows you to send a āConfirmation Messageā that confirms the action has been done. Then ether you or your wife will know that it has been done and you can clear the message.
Blacky
Thanks for checking in and for this idea. I will keep it in mind for the future.
For this case I figured out the Alert function that is configured inside configuration.yaml. I was able to incorporate a couple of my goals including repeating notification, as well as making the notification disappear on all notified devices.
Nice one, thanks for letting us know.
Blacky
Iām a total HA newbie and I feel like I should be able to make use of this blueprint, but Iām having trouble specifically with setting up an action when the automation fires to be able to turn things off that trigger my automation.
Context: I have a number of lights and switch entities that I have all configured to trigger my automation (Iām thinking I may need to create helpers to make these all lights or switches to make this simpler?) and my desired end state is that the notification that fires gives me the ability in the notification to turn off the lights / switches of those that specifically turned on. I donāt want to just turn off everything, just those that are turned on.
My issue is Iām trying to latch onto the triggering light / switch entity id. When I specify one of my entities it looks like the YAML below. However I donāt want this to be static I want this to be dynamic based on the triggering entity id. Iāve tried supplying {{trigger.entity_id}}
for the entity_id
in start_action_1
but this produces an error.
Any ideas for how I can make this work? Thanks in advance!
alias: "LIGHTS TEST: Lights on While Away"
description: Notify when lights are turned on at the house when I'm away
use_blueprint:
path: Blackshome/state-notifications-and-actions.yaml
input:
entity_a_trigger:
- light.dimmer_switch_2
- light.dimmer_switch
- light.master_bedroom_dimmer_1
- light.master_bedroom_dimmer_2
- light.master_closet_light_switch
- light.3rd_floor_office_light_dimmer
- switch.s2_on_off_switch
entity_a_state: "on"
time_delay_a_state: 0.5
global_conditions:
- condition: not
conditions:
- condition: zone
entity_id: person.me
zone: zone.home
include_start_notify: enable_start_notify_options
start_notify_device:
- <notify_device_id>
start_title: Home Lights Turned On
start_message: While you're away from the house, lights were turned on
include_start_action_buttons: []
start_action_button_1: Turn Off Lights
start_action_button_stop: Ack
start_time_delay:
hours: 0
minutes: 10
seconds: 0
start_action_1:
- service: switch.turn_off
metadata: {}
data: {}
target:
## vv THIS IS WHERE I NEED HELP vv
entity_id: switch.s2_on_off_switch
## ^^ THIS IS WHERE I NEED HELP ^^
include_start_auto_actions:
- enable_start_action_1
Hi AP, well this is a bit tricky but because you have switch and lights you are best to use a āHome Assistant Core Integration: Generic turn offā and then you will need to edit in YAML and your YAML will be as shown below.
service: homeassistant.turn_off
data:
entity_id: "{{ trigger.entity_id }}"
or here is your full YAML but you will need to select your device in āStart Notify - Devices To Notifyā as it was also not selected. I also āEnable action button 1ā in āStart Notify - Action Buttons Options (Optional)ā. Copy Paste this YAML and add your device and it should work.
alias: "LIGHTS TEST: Lights on While Away"
description: Notify when lights are turned on at the house when I'm away
use_blueprint:
path: Blackshome/state-notifications-and-actions.yaml
input:
entity_a_trigger:
- light.dimmer_switch_2
- light.dimmer_switch
- light.master_bedroom_dimmer_1
- light.master_bedroom_dimmer_2
- light.master_closet_light_switch
- light.3rd_floor_office_light_dimmer
- switch.s2_on_off_switch
entity_a_state: "on"
time_delay_a_state: 0.5
global_conditions:
- condition: not
conditions:
- condition: zone
entity_id: person.me
zone: zone.home
include_start_notify: enable_start_notify_options
start_notify_device: []
start_title: Home Lights Turned On
start_message: While you're away from the house, lights were turned on
include_start_action_buttons:
- enable_start_action_button_1
start_action_button_1: Turn Off Lights
start_action_button_stop: Ack
start_time_delay:
hours: 0
minutes: 10
seconds: 0
start_action_1:
- service: homeassistant.turn_off
data:
entity_id: "{{ trigger.entity_id }}"
include_start_auto_actions:
- enable_start_action_1
Also note you have āEnable start auto action 1ā and your time delay is 10 min so if you donāt action the notification in 10 min then it will do it for you.
Let us know how you go.
Blacky
Blacky
Hi @Blacky!
My goal is to use your script for the following:
I have created a helper with all my windows: binary_sensor.fenster
entity_id:
- binary_sensor.burofenster
- binary_sensor.schlafzimmerfenster
- binary_sensor.badezimmerfenster
- binary_sensor.terrassentur
- binary_sensor.esszimmerfenster_links
- binary_sensor.esszimmerfenster_rechts
- binary_sensor.gastezimmerfenster
- binary_sensor.hauswirtschaftsraumfenster
- binary_sensor.gastebadfenster
- binary_sensor.barfenster
icon: mdi:window-closed-variant
friendly_name: Fenster
Now I would like to get opened and closed messages with the individual name of the window that has been opened or closed. May you give me a hint how to realize that?
Cheers
Onto the next blueprint I see
For this you will need to use the start and end actions. Follow this.
Now you have 2 option.
OPTION 1: Use the notify inputs - Easy to do and recommended option
{{ trigger.entity_id }}
{{ states[trigger.entity_id].attributes.friendly_name }}
OPTION 2: Or you can use the auto actions, see below.
service: notify.mobile_app_your_device_here
data:
title: Window Open
message: "{{ trigger.entity_id }}"
service: notify.mobile_app_your_device_here
data:
title: Window Open
message: "{{ states[trigger.entity_id].attributes.friendly_name }}"
Use The End Auto Action Options (Optional) = Select āEnable end auto action 1ā
End Action - Action 1 = add action, type ānotiā and select your notify device. Then edit in YAML and your code will be this
For getting your entity ID in the message use this
service: notify.mobile_app_your_device_here
data:
title: Window Closed
message: "{{ trigger.entity_id }}"
For getting the friendly name of your entity in the message use this
service: notify.mobile_app_your_device_here
data:
title: Window Closed
message: "{{ states[trigger.entity_id].attributes.friendly_name }}"
Let us know how you go.
Blacky
Works like a charm! Many thanks again.
Cheers
Amazingā¦ thanks very much for the response and glad to know I was so close to the solution can confirm this is looking good and my notification options are working. Love when a plan comes together, thanks again
Your welcomeā¦ you were very close those āā is all that was missing.
Nice one glad your up and running and thanks for getting back to us.
Enjoy
Blacky
Would it be possible to add an option to Notify devices, only when they are Home/Away state? Thanks
Novice here, soā¦thank you for the Blueprint.
Exactly what I was looking for.
Iāve added a bunch of Aqara entry sensors to the blueprint, Aqara sensors seem instantaneous, arrival of push varies in arrival time.
The push to device is my phone. Samsung S23 Ultra, Android. Nothing else added yet.
What am I doing wrong if anything? Can I fix it somehow?
If using notify and the companion app I read about priorities and some other things, but that doesnāt appear to be an option to push to. Or something like that.
So I donāt understand what I need to do to make sure push notifications are as fast as possible.
If you are notifying a device it should be fast. notifications take about < 1 second.
Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā</>ā and paste code in there.
Blacky
Here you go and thanks for the time.
Let me say my Zigbee is Zha, all Aqara entry sensors.
Iāll keep troubleshooting as Iām uncertain whatās happening. Zigbee visualization looks as usual.
What I think I may be seeing, but am still investigating. I ran some test.
Iād listen for her to open a door that gets opened often. And expect a ping on my phone. Sound and push.
It seemed delayed, amount not determined yet.
But them on second test, I stood right at the door and opened and closed several times. Pined every time fast. Only did that 4 or 5 times. Sheāll think Iām losing it. Novice doesnāt even know how to paste code. Lol
If I discover any rhyme or reason Iāll post.
Im certainly not blaming the Blueprint, just puzzled. Yaml .
type or paste code here
alias: "Aqara Sensor Has Opened "
description: Something is up, Sensor Opened - investigate why
use_blueprint:
path: Blackshome/state-notifications-and-actions.yaml
input:
entity_a_trigger:
- binary_sensor.aqara_back_door_opening
- binary_sensor.aqara_basement_inner_door_opening
- binary_sensor.aqara_basement_outer_door_opening
- binary_sensor.aqara_basement_window_1_opening
- binary_sensor.aqara_basement_window_2_opening
- binary_sensor.aqara_basement_window_3_opening
- binary_sensor.aqara_basement_window_4_opening
- binary_sensor.aqara_computer_rm_window_opening
- binary_sensor.aqara_dave_s_bathroom_window_opening
- binary_sensor.aqara_front_door_opening
- binary_sensor.aqara_inner_garage_door_opening
- binary_sensor.aqara_laundry_room_window_opening
- binary_sensor.aqara_outer_garage_door_opening
- binary_sensor.aqara_north_garage_window_opening
- binary_sensor.aqara_toy_rm_window_1_opening
- binary_sensor.aqara_toy_rm_window_2_opening
entity_a_state: "on"
time_delay_a_state: 0
include_start_notify: enable_start_notify_options
start_notify_device:
- 98157786e5ad0eca1d113ad34ccd49fc
start_title: "Entry Sensor Has Opened "
start_message: "An Entry Sensor Has Opened - Investigate "
So it looks like it is working
Here is a TIP
Because you have a lot of sensors you can have the notification tell you what sensor opened so you know what is going ON.
{{ trigger.entity_id }}
{{ states[trigger.entity_id].attributes.friendly_name }}
Hope this helps you.
Blacky