Notification actions not working

I try to turn of the lights when nobody is home with a actionable notification to the iOS app. The notification appears, I press on the action but nothing happens. If I trigger the action manualy to turn of the lights it turns of the lights. There seems to be an error with the trigger from the “light check” automation.

Automation

> #Turn off light when nobody is home
> #check
> - id: light check
>   alias: light check
>   trigger:
>     platform: state
>     entity_id: group.all_devices
>     to: not_home
> #  condition:
> #    condition: or
> #    conditions:
> #      - contdition: state
> #        entity_id: group.all_lights
> #        state: 'on'
>   action:
>     service: notify.ios_iphonevandaan
>     data:
>       title: THE LIGHTS!
>       message: Niemand is thuis en de lichten staan aan. Wil je deze uitzetten?
>       data:
>         push:
>           category: 'LIGHTS'
> #end check

> #notification
> - id: Turn off lights
>   alias: turn off lights
>   trigger:
>     platform: event
>     event_type: ios.notification_action_fired
>     event_data:
>       actionName: TURNOFFLIGHTS
>   action:
>     - service: homeassistant.turn_off
>       entity_id:
>         - light.bureau_ledstrip
> #end notification
> #end turn of lights when nobody is home'

ios.conf

push:
categories:
- name: Lights when nobody is home
identifier: ‘LIGHTS’
actions:
- identifier: ‘TURNOFFLIGHTS’
title: ‘Lichten uitzetten’
activationMode: ‘foreground’
authenticationRequired: yes
desctructive: false
behavior: ‘default’
- identifier: ‘CANCEL’
title: ‘Cancel’
activationMode: ‘background’
authenticationRequired: no
desctructive: false
behavior: ‘default’

And it started working all of a sudden.

1 Like

Most likely it wasn’t working before because you do need to refresh the push notification settings in the iOS app. I believe a restart of Home Assistant will also do it but I always manually refresh them in the settings just to be safe when testing.

1 Like