Home Assistant Community

Actionable notifications on 2.0 beta

beta-testing
Tags: #<Tag:0x00007fcf48ddcc40>
#1

Hi,

I’m trying to get actionable notifications to work on the new 2.0 beta (build 53), but don’t succeed. Does anyone know what’s wrong with the config + automation?

config:

  ios:
      push:
        categories:
           - name: Alarm
             identifier: 'alarm'
             actions:
                - identifier: 'SOUND_ALARM'
                  title: 'Sound Alarm'
                  activationMode: 'background'
                  authenticationRequired: true
                  destructive: true
                  behavior: 'default'

automation:

    action:
       - service: notify.mobile_app_iphone
         data:
           message: "There is someone in the house"
           data:
              push:
                 category: "alarm"

Thanks
Cadish

#2

Stupid mistake… Needed to Import push configuration from server on my app…

Solved!

1 Like
#4

Mine will not Work at all. I am on 58 and 0.92.2.
Wenn I use config with “mobile_app” no notification is imported wenn chossing this option in the notifications menu.
Wenn I use “ios” instead it IS imported but wenn I press the action button nothing happens (not even the “authentification” appears.

This is my config and automations. Can someone see what is wrong?

ios:
  push:
    categories:
      - name: Alarm
        identifier: 'alarm'
        actions:
          - identifier: 'TOGGLE_TEST'
            title: 'Toggle kitchen'
            activationMode: 'background'
            authenticationRequired: true
            destructive: true
            behavior: 'default'

  - alias: Notify iOS test
    trigger:
      - platform: state
        entity_id: media_player.kitchen
        from: 'paused'
        to: 'playing'
    action:
      service: notify.mobile_app_jespers_iphone
      data:
        message: "iOS test"
        data:
          push:
            category: "alarm"

  - alias: iOS notification action pressed
    hide_entity: true
    trigger:
      - platform: event
        event_type: ios.notification_action_fired
        event_data:
          actionName: TOGGLE_TEST
    action:
      - service: light.toggle
        entity_id: light.kitchen
#5

Push config remains under ios. It does not get moved under mobile_app.

#6

But I have used ios in config but nothing happens when pressing the action button. The notification gets through though.

#7

Are you 100% sure the event isn’t firing back to Home Assistant? Maybe you aren’t catching the right event? Take a look here for more info

#8

It seems the only difference between the docs and my automation is the action_data part.
I am not using that but don´t know if that is essential.
Where can I see if the event is getting through back to HA?
Anyway shouldn´t I get some authentification request when pressing the action button?

#9

It seems the only difference between the docs and my automation is the action_data part.
I am not using that but don´t know how essential that is.
Where can I see if the event is getting through back to HA?
Anyway shouldn´t I get some authentification request when pressing the action button?