Actionable notifications doesn't work for me

Hi,

I have setup actionable notifications, and I cannot make it work. I get the notification, but the button is missing. And I know you have to swipe down on it to show the actions, or to the left on the lockscreen.

This is the config: https://hastebin.com/juxuzuxuja.pl

Tried without “authenticationRequired: yes”, but that only affects the lockscreen notification.

Any ideas?

try this the identifier must be lower case (‘alarm_disarm’) also the category must be lower case (‘alarm_disarm’)

ios:
  push:
    categories:
      - name: alarm_trigger
        identifier: 'alarm_disarm'
        actions:
          - identifier: 'ALARM_DISARM'
            title: 'Larma av'
            authenticationRequired: yes
            destructive: yes

automation:
  - alias: 'iOS - Alarm Triggered Notification'
    trigger:
      - platform: state
        entity_id: binary_sensor.motion_camera_entrance
        to: 'on'
    condition:
      - condition: state
        entity_id: alarm_control_panel.ha_alarm
        state: armed_away
    action:
      - service: notify.ios_iphone
        data:
          title: "Inbrottslarm"
          message: "Rörelse detekterad"
          data:
            push:
              badge: 0
              category: 'alarm_disarm'

  - alias: 'iOS - Alarm Triggered Action'
    trigger:
      - platform: event
        event_type: ios.notification_action_fired
        event_data:
          actionName: ALARM_DISARM
    action:
      - service: alarm_control_panel.alarm_disarm
        entity_id: alarm_control_panel.ha_alarm

You are correct! Got it showing, but when clicking the button, nothing happens. The alarm does not disarm. If i run the automation from the frontend it does disarm. Why doesnt it work from the iPhone?

There might be something wrong with my iOS integration to Home Assistant. Because when checking the status of the phone, battery level and such it is stuck at the same value all the time:

sensor.iphone_battery_level	39	
Battery State: Unplugged
Battery Level: 39
Device Type: iPhone 6s
Device Name: iPhone
Device Version: 11.1.2
unit_of_measurement: %
friendly_name: iPhone Battery Level
icon: mdi:battery-40

sensor.iphone_battery_state	Unplugged	
Battery State: Unplugged
Battery Level: 39
Device Type: iPhone 6s
Device Name: iPhone
Device Version: 11.1.2
friendly_name: iPhone Battery State
icon: mdi:power-plug-off

My phone is at 90% at the moment, and I have checked the status in Home Assistant a few times the last days, always stuck on 39%. Maybe this affects the actionable notifications, and is why there is no automation which runs when I click the button?

mine does that too it doesn’t report right away the battery level and the plug unplug i dont think that is the problem they where some spacing problen i dont have the alarm system but try this see if it works
after any change to the actionable notifications you need to restart home assistant and update push notifications on the iphone app if you forget to update push notifications it wont work

ios:
  push:
    categories:
      - name: alarm_trigger
        identifier: 'alarm_disarm'
        actions:
          - identifier: 'ALARM_DISARM'
            title: 'Larma av'
            authenticationRequired: yes
            destructive: yes

automation:
  - alias: 'iOS - Alarm Triggered Notification'
    trigger:
      - platform: state
        entity_id: binary_sensor.motion_camera_entrance
        to: 'on'
    condition:
      - condition: state
        entity_id: alarm_control_panel.ha_alarm
        state: armed_away
    action:
      - service: notify.ios_iphone
        data:
          title: "Inbrottslarm"
          message: "Rörelse detekterad"
          data:
            push:
              badge: 0
              category: 'alarm_disarm'

  - alias: 'iOS - Alarm Triggered Action'
    trigger:
      - platform: event
        event_type: ios.notification_action_fired
        event_data:
          actionName: ALARM_DISARM
    action:
      service: alarm_control_panel.alarm_disarm
      entity_id: alarm_control_panel.ha_alarm

It still doesn’t work, clicking the notification doesn’t do anything.
But if I run the automation in frontend it works great!

So I really don’t understand, the notification is received, the button is there, and the automation works in front end. But somehow when I click it, Home Assistant doesn’t do the automation, it must not receive it at all?

And about the iPhone battery registration, it is not that it is slow to register. It doesn’t ever change. Mine has been on the same battery percentage for 3 days now in Home Assistant, stuck on 39%, and unplugged. Nothing is registrered.

Same issue here.
Nothing happens while clicking on the notification button.
Can’t find any error or event either.

Running HA on latest IOS / iPhone X / apple watch.

Another quick question; does the apple watch only shows the first item?

can you post your configuration to help you

when you said run automation on fronted
are using the developers tool or just clicking on the automation trigger ??
like i said i dont have the alarm component but try to use different action just for testing like turning a light off

action:
  service: light.turn_off
  entity_id: ligth.yourlight

Sure :slight_smile:

ios:
  push:
   categories:
  - name: Alarm
    identifier: 'alarm'
    actions:
      - identifier: sirene
        title: 'Sirene'
        activationMode: 'background'
        authenticationRequired: no
        destructive: yes
        behavior: 'default'
      - identifier: uitschakelen
        title: 'Uitschakelen'
        activationMode: 'foreground'
        authenticationRequired: yes
        destructive: no
        behavior: 'default'

# response op actie push iPhone na alarm trigger
# Response is SILENCE_ALARM
- id: alarmSilence
  alias: "Alarm disabled using phone"
  initial_state: 'on'
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: uitschakelen
  action:
  - service: alarm_control_panel.alarm_disarm
    entity_id: alarm_control_panel.alarm
    data:
      code: 1234

# Response is SILENCE_ALARM
- id: alarmSirene
  alias: "Alarm enabled using phone"
  initial_state: 'on'
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: sirene
  action:
    - service: homeassistant.turn_on
      entity_id: light.tafel, light.woonkamer_2, light.huisjes, light.dressoir, light.woonkamer
      data:
        brightness_pct: 99

i dont see anything wrong im testing your configuration with a light instead of the alarm component
with the light everything is working just fine

i’m sorry guys for the for the delay i was working on MQTT alarm panel i got it working this is my configuration

ios:
  push:
    categories:
      - name: alarm_trigger
        identifier: 'alarm_disarm'
        actions:
          - identifier: 'ALARM_DISARM'
            title: 'alarm'
            authenticationRequired: yes            
            destructive: yes
            
automation old:            
  - alias: 'iOS - Alarm Triggered Notification'
    trigger:
      - platform: state
        entity_id: group.main_bedroom_lights
        to: 'on'
    condition:
      - condition: state
        entity_id: alarm_control_panel.ha_alarm
        state: armed_away
    action:
      - service: notify.ios_my_iphone
        data:
          title: "disarm"
          message: "dissarm alarm"
          data:
            push:
              badge: 0
              category: 'alarm_disarm'
  - alias: 'iOS - Alarm Triggered Action'
    trigger:
      platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: ALARM_DISARM
    action:
     service: alarm_control_panel.alarm_disarm
     entity_id: alarm_control_panel.ha_alarm 

alarm watch

Hi all,

Just in case you haven’t got this working yet or some one else comes across this thread, make sure after you’ve made your HASS changes and restarted that you then go into the iOS app to Settings > Notification Settings > “Update push settings”. That should do it.