iOS notifications not working?

I have automations setup for entering and exiting zones to send notifications to my iPhone but they just don’t work.

If I test the notifications in the Services section it goes through to my phone just fine.

Capture

But my automation using the same service doesn’t send the notification. I have verified in the logs that that automation triggers and tries to send the notification but it just doesn’t happen.

Capture

My code in automations.yaml

- alias: NotifyWhenZoneAway
  trigger:
    platform: zone
    entity_id: device_tracker.jiphone
    zone: zone.home
   # Event is either enter or leave
    event: leave
action:
  service: notify.ios_jiphone
  data_template:
    title: "Leave Home Zone"

Any ideas about what I’m missing?

Did you enable ios: in your configuration.yaml? Also, try following this format…

  automation:
    - alias: Notify iOS app
      trigger:
        ...
      action:
        service: notify.NOTIFIER_NAME
        data:
          message: "Something happened at home!"
          data:
            push:
              badge: 5

Finally, make sure you update push settings in the ios app. It’s in the notification settings area of the settings.

Yep, enabled in my configuration.yaml with ios:

I’ll try the format using the data: instead of data_template: but I also have notifications using data: that don’t work either.

Thanks for the suggestions.

Try removing and re-installing the app. That has worked for me a couple of times when I had similar issues.

@TheFourDees did you hit the update push settings within the iOS app? Also, since the latest update i believe the changed the way these are handled and you no longer need to capitalize the notifier name if you are on .54.

iOS: All category identifiers need to be lowercase. If you do not update, it will break actionable notifications to IOS devices sent by scripts/automations. (@rbflurry - #9427) (breaking change)

@zyberSE: yep, reinstalled yesterday.

@Maaniac: Also updated the push notifications when I reinstalled.

Also just noticed that in the app it doesn’t look like the IOS Component, Device Tracker and IOS Notify components and platforms are loaded properly (x beside them.)

This was working find yesterday so I think there is still some flakeyness in the App/HA component that causing these things to fail sporadically. Yet I can still call the notification service to my iPhone from the Services panel and it comes through to my phone.

Just re-connect your connection by tapping Save and they should go back to the checkmarks.

Also, just another tip, when testing an automation, I usually make an input_boolean.test, put it in your frontend somewhere and then use that as another trigger in your automation.

Just reset everything and it checked everything off but I just went back into the app and they are all x’d out again!

Hit Save and they were checked off again! Not sure if the options being x’d out is just a UI thing and it’s actually ok or there is still something wrong.

I did successfully receive a push notification on one of my automations. I’m not sure if using the code you suggested is what fixed that…or the reset. Too many variables but there is still something wierd going on since those settings appear to get disabled randomly in the app even though the notify service still works through the Service panel.

Will see if it works consistently now.

1 Like