Actually you can, but the programming is bit more involved…
As @zacwest said, there’s an example in the documentation.
That being said, here is a post with actual code from a user: Wait for Trigger & Choose with Value Template… - #6 by woodmj74
He is also using iPhone, so should be pretty easy to modify to your needs
[I’ve been on this for hours, it became a challenge!]
I’d think it would be something like this:
In theory, this should: trigger (some light has been left on).
- send a notification to a phone (fill your device id in the placeholder, remove the [ ])
- wait for a response for 5 minutes.
- If you click on the notification, should turn off some light (fill in the id)
- If no interaction with the notification, it should leave the light on and end the automation run.
This code should go in the actions part of the automation.
action:
- device_id: [deviceID]
domain: mobile_app
type: notify
title: Light on
message: SomeRandomLight was left on!
data:
actions:
- action: TURN_OFF
title: Turn off
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: TURN_OFF
timeout: '00:05:00'
continue_on_timeout: false
- service: light.turn_off
target:
entity_id: light.somerandomlight
mode: single
Wow, that took quite a while to figure out… By the way everything except for the button can be done from the UI. You can create every action and then edit the notification one in YAML.