I am rewriting my automations waiting for notification actiions into one automation using the UI editor. I cannot seem to get these new wait_for_trigger working. Here is my complete automationcode copied from the automations.yaml:
Iâd verify that your event is formatted properly. Go to the event page and listen to âmobile_app_notification_actionâ. Make sure you trigger the event. Then paste the results here and we can see if your event_data is formatted properly.
based on your code it should be working. I would wager that youâre looking in the wrong spot then. Verify that your conditions are being met properly.
Or explain whatâs not working with the wait_trigger.
I donât understand; I want to start the vacuum when i click the notification on my phone. According to the new âwait_for_triggerâ this should listen to the mobile_app_notification_action event for an hour. If it receives the castor_start_clean event it should go forward and start vacuuming, otherwise after an hour the automation should end.
The persistent notification is a great way to test things out, tnx, ddnât know:-)
I found it. in my first post i had removed my girlfrients notification. What i want to do is send a notification to my girlfriend and myself IF we are at home. So like this:
action:
- condition: state
entity_id: device_tracker.life360_frans_rampen
state: home
- data:
data:
timeout: 1800
actions:
- action: castor_start_clean
title: Start nu
message: Castor wil een rondje stofzuigen!
title: Stofzuigers
service: notify.mobile_app_telefoon_frans
- condition: state
entity_id: device_tracker.life360_laura_de_koning
state: home
- data:
data:
timeout: 1800
actions:
- action: castor_start_clean
title: Start nu
message: Castor wil een rondje stofzuigen!
title: Stofzuigers
service: notify.mobile_app_telefoon_laura
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: castor_start_clean
timeout: 01:00:00
continue_on_timeout: false
- service: persistent_notification.create
data_template:
message: Wait for trigger at {{ as_timestamp(now()) | timestamp_custom("%I:%M
%p") }}
But it seems like if my girlfriend is not at home; the notification isnât send, but the rest of the automation is also stopped! So how can i make sure only action right after the condition is skipped, moving on with the next action?
Youâll have to separate the condition and action into a separate script. Then call that script in this automation.
Conditions in an action by default stop all other actions. So if you separate said condition into itâs own script with the actions you want to cancel, the script wonât cancel actions because it just fires the script.
I also need a bit of help with this Wait for trigger feature.
What I wanna do:
With my smart plug:
When supplied power goes above 10W, automation launched.
Wait for power decreasing below 10W for a given period.
When done, send me a notification.
Quite simple, but I donât manage to make it work.
Hereâs my automation :
I happen to be trying something very similar to what you want. I canât make it work either. It appears that the trigger does not read the entityâs power information.
Have you managed to solve it?
Hey !
I solved my issue, but using a workaround, not with Wait for trigger.
I created an Input (a Boolean, indeed) called âwashing machine activatedâ from the Configuration menu.
Then I subdivided my single automation into 2:
The first one starts when Power is above 10W for a certain time, and then toggles the Input to âOnâ.
The second one Starts when power is below 10W, and as a Condition, checks if the Input state is âOnâ.
If itâs the case, then send the notification to my phone âWash cycle ended.â
Hoping it will help you ! And sorry for my perfectible EnglishâŠIâm French.
I hope it will remain understandable ;).
Thank you for your help.
I will think of some other way to perform this.
What makes me curious is why it doesnât work with the trigger, if the option is there and the logic too.
This is my automation:
alias: Shower Time
description: ââ
trigger:
platform: tag
tag_id: 4b54f3fc-f06f-xxxx-xxxx-cf1036d425f9
condition: []
action: