Action dont wok on Actionable Notifications

Hi,

I can’t get the actions to work when I am trying to set up it up. I get the notifications to the phone and I get the two different options when I am pressing. But then nothing happens. I have restarted and updated the settings in the iOs app.

Someone that can help we with what I missed?

configruation.yaml

ios:
  push:
    categories:
      - name: Alarm
        identifier: 'ALARM'
        actions:
          - identifier: 'bortaapp'
            title: 'Stäng av bortaläget'
            activationMode: 'background'
            destructive: no
            behavior: 'default'       
          - identifier: 'utlostapp'
            title: 'Utlös larmet'
            activationMode: 'background'
            destructive: yes
            behavior: 'default'

Automation.yaml

## Sending the notification

- alias: Test
  trigger:
    platform: state
    entity_id: input_boolean.test
    from: 'off'
    to: 'on'
  action:
    - service: notify.ios_iphone_7_plus
      data:
        message: "Test message"
        data:
          push:
            badge: 1
            category: "ALARM"
          action_data:
            entity_id: light.vardagsrum__tvbank
            my_custom_data: foo_bar
           
# Action option 1    
    
- alias: 'Larm av app'
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
        actionName: bortaapp
  action:
    service: alarm_control_panel.alarm_disarm
    entity_id: alarm_control_panel.house


# Action option 2

- alias: 'Utlös i app'
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
        actionName: utlostapp
  action:
    - service: homeassistant.turn_on
      entity_id:
        - switch.kontor__hylla

Your config looks very similar to mine, and mine is working. The only real difference is that I have all my identifiers in all caps in both the config and the automations. I don’t know if that is mandatory, but that is the only big difference I see. I’ll post my config just in case it helps.

iOS config:

ios:
  push:
    categories:
      - name: Alarm
        identifier: 'ALARM'
        actions:
          - identifier: 'ARM_ALARM_STAY'
            title: 'Arm Alarm to Stay'
            authenticationRequired: yes
          - identifier: 'ARM_ALARM_AWAY'
            title: 'Arm Alarm to Away'
            authenticationRequired: yes
            destructive: yes

Push automation:

- alias: 'Notify if Alarm not set at night'
  trigger:
    - platform: time
      at: '22:00:00'
  condition:
    condition: state
    entity_id: alarm_control_panel.cpi_security
    state: 'disarmed'
  action:
    - service: notify.ios_mikegs_iphone_6s
      data_template:
        title: 'The Alarm has not been armed for the night'
        message: 'Do you want to arm it?'
        data:
          push:
            category: 'ALARM'

Action automations:

- alias: 'iOS Notification Action - Arm Alarm Stay'
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: ARM_ALARM_STAY
  action:
    service: alarm_control_panel.alarm_arm_home
    entity_id: alarm_control_panel.cpi_security
    data:
      code: !secret cpi_pin

- alias: 'iOS Notification Action - Arm Alarm Away'
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: ARM_ALARM_AWAY
  action:
    service: alarm_control_panel.alarm_arm_away
    entity_id: alarm_control_panel.cpi_security
    data:
      code: !secret cpi_pin
1 Like

I changed it to caps and that did the trick, so it seams that it is a must to writ it in caps.

1 Like