Actionable Notofocation Help

Tags: #<Tag:0x00007f78038942c0>

Can anyone tell me what I cannot see is wrong in my actionalble notification setup

Background: I want to be able to send out a notification to everyone in the household, we use iOS devices, and ask if they want a bath tonight. If they answer yes, then water heater will be put on “boost” by turning on the boost switch, if no, then it does nothing - No is linked to a dummy switch so people actually have to choose :slight_smile:

Simple - well, you would think so. Anyway, I have the automations all working and can manually trigger in home assistant

The iOS notification happen when they are supposed to @ 5pm and I get the actionable notification on my iPhone with “Yes” or “No”

What does not happen is fire off the automation when I click “Yes”

My automations are:

- alias: Bath Tonight - iOS Notification
  initial_state: true
  trigger:
    - platform: time
      at: '17:00:00'
  action:
    service: notify.ios_mjpiphonex
    data:
      message: "Do you want a bath tonight?"
      data:
        push:
          badge: 0
          category: 'doyouwantabath'

- alias: "Bath Tonight - iOS Notification (Response-Yes)"
  initial_state: true
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: YESIDOWANTABATH
  action:
    service: switch.turn_on
    entity_id: switch.waterheaterpeak

- alias: "Bath Tonight - iOS Notification (Response-No)"
  initial_state: true
  trigger:
    platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: NOIDONOTWANTABATH
  action:
    service: switch.turn_off
    entity_id: switch.waterheateroffpeak

iOS

push:
  categories:
    - name: Do you want a bath tonight
      identifier: 'doyouwantabath'
      actions:
        - identifier: 'YESIDOWANTABATH'
          title: 'Yes'
          activationMode: 'background'
          authenticationRequired: true
          destructive: false
          behavior: 'default'
        - identifier: 'NOIDONOTWANTABATH'
          title: 'No'
          activationMode: 'background'
          authenticationRequired: true
          destructive: false
          behavior: 'default'

What happens if you manually trigger the action automations?
maybe the notification return is being blocked. you use other actions that work?

@tmjpugh Manual trigger of the automation happens fine

I suspect it the return event not firing from iOS app or not being picked up by homeassistant

I just can’t find or see which is not happening

I have imported the categories in the app also but nothing

Cheers

Do you use reverse proxy like Nginx? Maybe you can watch this log for incoming message or error.

HA error log may show something if there is problem

@tmjpugh

No reverse proxy :frowning:

Maybe look in forum and ask in active thread re:iOS notifications

I don’t use iOS so not sure how troubleshoot. Even Android troubleshooting is sketchy but at least it easy to verify connected or not

@matthewjporter for actionable notification you need 3 parts
1- ios push part
2- automation to trigger the notification
3 - automation to processes the incoming data from the actionable notifications (payload)
i can see that youo have 1 and 3 but i dont see part 2 here is an example i hope it helps if you still can’t make it work let me know ill be happy to make an example for your set up

@Kem Thanks, I do have the auotamation to fire the notification “Bath Tonight - iOS Notification” and it fires off 100% at 5pm everyday

It just wont trigger the “yes” or “no” response automation (which manualy work) when I select “Yes” or “No” on the iOS device

@matthewjporter ok i did not understand the problem untill i read it two times
(English not my first language) you can try to change the category name to uppercase if you are using the ios 1.5 app and there is an update notifications button on the app settings that you have to push every time you change something in the 1.5 app
I test your set up on my phone running the 2.0 ios app and it worked just fine

@Kem Thanks for testing, So atleast I know its works :slight_smile:

I have the V2 iOS app so must be somthing in my setup

Thanks all for the assistance.

Not sure what of the following fixed the issue, but the above is working ike a charm

  1. Reset all my token in homeassistance
  2. Reset the app configuration on my devices (Resetting tokens actually forced this to be done)

After resetting the app config, I had to run the discovery of my home assistant again when opening the app, imported the push notifications and is working 100% as expected