I have created an actionable notification to turn my sonos alarm off and on triggerred by bank holiday and annual leave sensors.
It works… but only if ios settings are as below AND the app is running on my phone
This is my code in config.yaml
ios:
push:
categories:
- name: bankholidayalarm
identifier: 'alarm'
actions:
- identifier: 'SONOS_ALARM_OFF'
title: 'Alarm off'
activationMode: 'foreground'
authentificationRequired: yes
destructive: false
behaviour: 'default'
- identifier: 'SONOS_ALARM_ON'
title: 'Alarm on'
activationMode: 'foreground'
authentificationRequired: yes
destructive: true
behaviour: 'default'
If the app is not running and I trigger the automation I receive the notification, click the required response, the app requests verification and the app opens as expected but nothing happens i.e. sonos alarm status hasn’t changed. There are no errors in the logs its like the ios event doesn’t fire so I’m thinking maybe this is normal behaviour if the app isnt open??
If I change activationMode to background nothing happens either, apart from when I open the app it has broken the connection to the ios component altogether. Hit save its restored but the actions aren’t carried out.
Since all the searching on this forum and in the docs nearly everyone has set activationMode to background I am wondering what else I am missing.
I have checked the settings in my ios app and background app refresh is on.
I have also ensured that when I have changed my ios config, I have rebooted HA and updated the push settings on my phone.
Any help please I am about to give up on it