I am proberly making a mistake somewhere, but i do not see it. This is my code:
ios:
push:
categories:
- name: kastlampnogaan
identifier: kastlampnogaan
actions:- identifier: ZETKASTLAMPUIT
title: “Zet de lamp uit”
activationMode: ‘background’
authenticationRequired: no
destructive: yes
behavior: ‘default’
- identifier: ZETKASTLAMPUIT
automation;
-
id: action_push_message
alias: ‘Action Push Message Kast Lamp nog aan’
initial_state: ‘on’
trigger:- platform: state
entity_id: light.kast
to: ‘on’
for:
minutes: 30
condition:
condition: and
conditions:- condition: state
entity_id: ‘device_tracker.iphonevanmartin’
state: ‘not_home’ - condition: state
entity_id: 'device_tracker.iphonevanvrouw
state: ‘not_home’
action:
service: notify.familie
data:
message: “De Kast lamp staat nog aan!”
data:
push:
badge: 0
category: “kastlampnogaan”
action_data:
entity_id: light.kast
- condition: state
- platform: state
-
id: push_notify_kastlampnogaan_action
alias: ‘Push Notify Action for Kast Lamp nog aan’
initial_state: ‘on’
trigger:- platform: event
event_type: ios.notification_action_fired
event_data:
actionName: ZETKASTLAMPUIT
action:
service: homeassistant.turn_off
entity_id: light.kast
- platform: event
I am getting the push notification on my phone, but the Action butten does not turn off the lights.
I am pretty sure there is a light.kast and i can turn this device on or off within HA itself just fine.
I made the following script to test the notification:
test_actionable_notify:
alias: ‘Test Action Push Message Kast Lamp nog aan’
sequence:
- service: notify.ios_iphone_van_martin
data:
message: ‘Test: kast lamp staat nog aan!’
data:
push:
badge: 0
category: “kastlampnogaan”
action_data:
entity_id: light.kast