iOS Actionable Notifications - got it working! Wuhoo!

This wasn’t as hard as I though it would be. Took a little bit of trial and error, but I finally got it working with my garage doors. Now I get a notice on my iphone if I leave the garage doors open at night, and I can click to close them, or leave them open (if I’m still out there working).
I also set it up to give a notification every time the the door opens. Now we use that to close the door right after we come in or go out.

Got a request to add the config lines here for easy copying.
Here you go: (formatting is messed up).
go here instead:

automation old:

  • alias: Notify iOS Janis Garage #creates the notification
    initial_state: True
    hide_entity: True
    trigger:

    • platform: time
      at: ‘22:00:00’ #change this to actual trigger
      condition:
      condition: state
      entity_id: cover.double #id of your garage door relay
      state: open
      action:
      service: notify.ios_justin_iphone_ #id of your ios device, might not show up until you’ve loaded the ios component in HA
      data:
      title: “Janis’ Garage Check” #customizable
      message: “It’s 10pm and Janis’ Garage is Open” #customizable
      data:
      push:
      badge: 0 # this will remove the badge/app icon number
      category: ‘GARAGE1’ #name matched in ios component
  • alias: iOS app notification action garage1 #creates the action button
    initial_state: True
    hide_entity: True
    trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
    actionName: CLOSE_JANIS #name matched in ios component
    action:
    service: cover.close_cover
    entity_id: cover.double

ios: ios component
push:
categories:
- name: garage1
identifier: ‘GARAGE1’
actions:
- identifier: ‘CLOSE_JANIS’ ## this must point to an action ##
title: ‘Close Janis Garage Door’

that’s it for the config.yaml
The other part is just downloading the ios app on your phone and connecting it to your HA.

23 Likes

I like your videos, easy to follow and informative! Just subscribed :slight_smile:

1 Like

awesome
thanks!

Thanks mate :smiley: your support to community is awesome!

1 Like

Hi DrZzs,

thanks to your videos I started with home assistastant and I’ve tried to make actionable notifications
Unfortunately I get just the message but not the choice.

Yesterday I’ve posted a request on this forum and now I’ve found out that you also are here with your topic.

I’ll delete the original post if I can find a way

The automation makes the check of total power consumption and if above 3500w all the wemo switches are turned off. Then a message reaches my iPhone asking which switch I’l like to turn on.

The issue I’m facing is that I receive the message but without any multiple selection. Just the message with no switch choice
Do you have any idea where I’ve done any mistake?

My files:

automations.yaml:

- id: wemo_superano_soglia
  alias: Wemo superano soglia
  initial_state: true
  hide_entity: false
  trigger:
  - above: '3500'
    entity_id: sensor.tot_current_power
    platform: numeric_state
  action:
    - service: homeassistant.turn_off
      entity_id: switch.lavastoviglie
    - service: homeassistant.turn_off
      entity_id: switch.lavatrice
    - service: homeassistant.turn_off
      entity_id: switch.forno
    - service: notify.notify
      data:
        title: "Attenzione:"
        message: "superato il consumo consentito, cosa vuoi ri-accendere?"
        data:
          push:
            badge: 0
            category: 'SCELTAWEMO'

- id: accendi_lavatrice
  alias: Accendi lavatrice
  initial_state: true
  hide_entity: false
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: LAVATRICE_ON
  action:
    service: homeassistant.turn_on
    entity_id: switch.lavatrice

- id: accendi_lavastoviglie
  alias: Accendi lavastoviglie
  initial_state: true
  hide_entity: false
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: LAVASTOVIGLIE_ON
  action:
    service: homeassistant.turn_on
    entity_id: switch.lavastoviglie

- id: accendi_forno
  alias: Accendi forno
  initial_state: true
  hide_entity: false
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: FORNO_ON
  action:
    service: homeassistant.turn_on
    entity_id: switch.forno

ios.yaml:

push:
  categories:
    - name: sceltawemo
      identifier: 'SCELTAWEMO'
      actions:
        - identifier: 'LAVATRICE_ON'
          title: 'Accendi lavatrice'
        - identifier: 'LAVASTOVIGLIE_ON'
          title: 'Accendi lavastoviglie'
        - identifier: 'FORNO_ON'
          title: 'Accendi forno'

configuration.yaml:

#iOS
ios: !include ios.yaml

Thank you!

I haven’t messed with actionable notifications for quite a while. My first suggestion would be to go to the iPhone Home Assistant app and click settings (gear in lower right corner), then Notification Settings, then Update Push Notifications.
As far as I can tell everything else in your configuration is correct.
Anything else you might need to know is likely on this page:

Hope that helps!

1 Like

the identifier and category must be lower case
try this and let me know if it works and also remember to update pushnotification on ios app

push:
  categories:
    - name: sceltawemo
      identifier: 'sceltawemo'   # must be lower case
      actions:
        - identifier: 'LAVATRICE_ON'
          title: 'Accendi lavatrice'
        - identifier: 'LAVASTOVIGLIE_ON'
          title: 'Accendi lavastoviglie'
        - identifier: 'FORNO_ON'
          title: 'Accendi forno'


- id: wemo_superano_soglia
  alias: Wemo superano soglia
  initial_state: true
  hide_entity: false
  trigger:
  - above: '3500'
    entity_id: sensor.tot_current_power
    platform: numeric_state
  action:
    - service: homeassistant.turn_off
      entity_id: switch.lavastoviglie
    - service: homeassistant.turn_off
      entity_id: switch.lavatrice
    - service: homeassistant.turn_off
      entity_id: switch.forno
    - service: notify.notify
      data:
        title: "Attenzione:"
        message: "superato il consumo consentito, cosa vuoi ri-accendere?"
        data:
          push:
            badge: 0
            category: 'sceltawemo'  #must be lower case 

- id: accendi_lavatrice
  alias: Accendi lavatrice
  initial_state: true
  hide_entity: false
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: LAVATRICE_ON
  action:
    service: homeassistant.turn_on
    entity_id: switch.lavatrice

- id: accendi_lavastoviglie
  alias: Accendi lavastoviglie
  initial_state: true
  hide_entity: false
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: LAVASTOVIGLIE_ON
  action:
    service: homeassistant.turn_on
    entity_id: switch.lavastoviglie

- id: accendi_forno
  alias: Accendi forno
  initial_state: true
  hide_entity: false
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: FORNO_ON
  action:
    service: homeassistant.turn_on
    entity_id: switch.forno
2 Likes

Hi Kem,
there were mistakes on the use of hyphen [-]
Thank you

excellent!
glad you figured it out.