Window has to be open first to get closed so if you just use the start for open and the end for closed then it will work.
Blacky
Window has to be open first to get closed so if you just use the start for open and the end for closed then it will work.
Blacky
Sorry, but it does not. If I configure the start notification with 15 minutes delay and close the window immediately after opening it, then the end notification will be shown. But Iād like to avoid it.
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.
alias: Benachrichtigung Fenster Bad
description: ""
use_blueprint:
path: Blackshome/state-notifications-and-actions.yaml
input:
entity_a_trigger:
- binary_sensor.parasoll_bad_contact
entity_a_state: "on"
entity_b_state: "off"
include_start_notify: enable_start_notify_options
start_notify_device:
- 123456775657686868
start_title: Fenster Bad offen
start_message: Fenster Bad offen
include_end_notify: enable_end_notify_options
end_notify_device:
- 123456775657686868
end_title: Fenster Bad geschlossen
end_message: Fenster Bad geschlossen
entity_b_trigger:
- binary_sensor.parasoll_bad_contact
global_conditions: []
time_delay_a_state: 15
Sorry I get what you are trying to do. Currently it just sends a notification when it happens. You could try and make a template sensor for the end to handle what you are trying to do and use that.
Blacky
May I ask you to consider this as a feature request? I found this blueprint, but yours supports the global condition which I also use.
Could you try a global condition that the window must be open for X amount of time.
Blacky
Hi, congratulations, nice project, Iām starting to use it now, I wanted to ask you, would it be possible to insert notifications on Telegram, if so, how can I do it? Thank you
notify_group:
name: Notification Group
description: The name of the notification group to call.
default: ""
variables:
group_target: !input notify_group
action:
- conditions: "{{ group_target is defined }}"
sequence:
- service: "notify.{{ group_target }}"
data:
message: !input notify_message
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