Notification action does not work in some automation

So, I’ve got a puzzle. Here is the config:

- id: daily_weather_forecast
  trigger:
    - platform: time
      at: '06:30:00'
  action:
    service: notify.ios_iphone_cezex         <-- this thing works
    data:
      title: 'test'
      message: 'test'

- id: at_home_cezex
  condition:
    condition: state
    entity_id: input_boolean.at_home_cezex
    state: 'off'
  trigger:
    - platform: zone
      entity_id: device_tracker.iphone_cezex
      zone: zone.home
      event: enter
    - platform: state
      entity_id: device_tracker.ping_iphone_cezex
      from: not_home
      to: home
      for:
        minutes: 15
  action:
    - service: homeassistant.turn_on            <-- this thing works
      data:
        entity_id: input_boolean.at_home_cezary
    - service: notify.ios_iphone_cezex          <-- this thing doesn't
      data:
        message: 'test'

I get a message from daily_weather_forecast action, but I don’t get one from at_home_cezex, even if first action homeassistant.turn_on works (the input_boolean.at_home_cezary is being updated properly). Any ideas why?

Maybe title is mandatory? I can check my iOS notifications later to verify but I think I always use both title and message

No, it’s optional. I’ve tested sending messages without title and it works.

That’s odd then. You’ve stumped me too

What’s even more puzzling is that this thing works perfectly :thinking:

- id: notify_at_home_cezex
  trigger:
    platform: state
    entity_id: input_boolean.at_home_cezex
    to: 'on'
  action:
    service: notify.ios_iphone_cezex
    data:
      message: 'test'

What if you reverse your two actions…maybe turning the input_boolean to on, then somehow sabotages the second action to send the notification. So try sending the notification first, then using the action to turn off the input_boolean.

Try taking out the data: on the input bool line, you shouldn’t need it and it maybe confusing the next action.

I think the problem lies not in configuration, but rather in unreliable push notifications sent to iOS application. I have three input_booleans defined for three people. Yesterday evening and today morning two of them started to work, one did not (and I didn’t change anything). So I’ve decided to modify the config once more and define automation which reacts on input_boolean state change (that way I can verify that all automations work).

At the beginning it didn’t work at all. I’ve restarted the HASS iOS app and now I get the notifications. I suppose it will stop working at some point. Maybe I should switch to other service like Prowl or Pushbullet.

Did you update your push notifications under the Settings>Push Notifications? I believe you may have to do this each time you add one. But even so, it helps to update them manually every once in awhile I find.

No I didn’t as opening the app from time to time seems to work… sometimes :wink: I will update the push notifications then, just in case. Thanks.