Hello,
I am trying to use Actionable Notification for iOS.
I have prepared a script and it’s working, but when I prepare an automation to run the script whenever an event is occuring, the script is called (i see it from the log), but the notification is not arriving to my iphone. It happens that the “timeout” branch is executed of course, as i cannot choose the action becaouse i don’t receive any notification.
Any idea on how to solve this?
The script:
alias: Chiedi se si vuole chiudere il garage
sequence:
- service: notify.mobile_app_iphone_di_giuliano_ita
data:
message: Vedo che sei uscito; vuoi chiudere il garage?
data:
push:
sound: Vuoi_che_chiuda_il_garage.wav
actions:
- action: CHIUDI
title: Chiudi garage
- action: ALLARMA
title: Chiudi e metti allarme
- alias: Wait for a response
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: CHIUDI
- platform: event
event_type: mobile_app_notification_action
event_data:
action: ALLARMA
timeout: '00:00:10'
- alias: Perform the action
choose:
- conditions:
- condition: template
value_template: >-
{{ wait.trigger != None and wait.trigger.event.data.action ==
"CHIUDI" }}
sequence:
- service: system_log.write
data:
level: info
message: >-
Script <Chiedi se si vuole chiudere il garage> - <<< Chiudo
garage >>>
- service: script.chiudi_garage
- conditions:
- condition: template
value_template: >-
{{ wait.trigger != None and wait.trigger.event.data.action ==
"ALLARMA" }}
sequence:
- service: system_log.write
data:
level: info
message: >-
Script <Chiedi se si vuole chiudere il garage> - <<< Chiudo
garage e metto allarme >>>
- service: script.chiudi_garage_e_metti_allarme
default:
- service: system_log.write
data:
message: Timeout
level: info
mode: single
Thank you!