Hi I’m trying to automate my vacuum, the idea is to send to my phone a massage when we are not at home if I want to start my vacuum. I would like to have a button in the push notification that can start the vacuum. So I’ve set it up like this:
- id: odkurzaj
alias: odkurzaj jak nikogo nie ma w domu
trigger:
- platform: state
entity_id: device_tracker.moto_g_8_power
to: not_home
- platform: state
entity_id: device_tracker.moto_g_30
to: not_home
condition:
- condition: state
entity_id: device_tracker.moto_g_8_power
state: not_home
- condition: and
conditions:
- condition: state
entity_id: device_tracker.moto_g_30
state: not_home
action:
- service: notify.mobile_app_moto_g_8_power
data:
title: Odkurzacz
message: Nikogo nie ma w domu, włączyć odkurzacz?
data:
actions:
- action: odkurzacz.start
title: Odkurzaj!
- service: notify.mobile_app_moto_g_30
data:
title: Odkurzacz
message: Nikogo nie ma w domu, włączyć odkurzacz?
data:
actions:
- action: odkurzacz.start
title: Odkurzaj!
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
actionName: odkurzacz.start
context:
user_id:
- ff065dcda9f44da0be36f57c6503c78f
- a9a4585967254409a309948f1f98a7f5
continue_on_timeout: false
- service: vacuum.start
data: {}
target:
entity_id: vacuum.viomi_se
And I get the notification that part works, but when I press the button to start vacuum nothing happens, what am I missing?