HELP! - Duplicated notification from yesterday's morning (iOS)

Yesterday morning, I started receiving duplicated notifications on each iOS device for an automation. I have one set up to trigger when the entrance sensor opens and/or closes. It was working perfectly in the past months.

Here’s the strange part: even though I turn off the automation and manually open or close the sensor, the notifications still keep coming to every iOS device - but at this time no duplications for sure. However, only iPhones are affected; my iPad isn’t.

All the logs, logbooks, traces, and everything looks fine. There’s no duplication or anything unusual there. None of the logs show any activity when I turn off the automation, but the iOS devices continue to receive the notifications.

I’m at a loss for how this could be happening. Does anyone have any ideas?

The app version is the same on all devices, including the iPad. It’s version 2025.1073.

Here are some additional details:

  • I didn’t update or install anything yesterday.
  • I’ve tried restarting the devices several times.

In addition, the duplicated notifications (which aren’t coming from the automation, but rather from a bug) don’t contain any valid attached pictures. Instead, they say there’s an error.
Attached a screenshot about that.

Any help would be appreciated. I feel like I tried everything (except reinstallings) but no luck at all.

Effect suggest your automation is duplicated somehow. I’d first try restarting HA to see if it is only in memory. Then I’d search automations.yaml to see if I can find the notification twice. The logbook (not the same as the log) should also be able to show what triggered the multiple notifications.

Thanks for your input.
I tried to restart HA multiple times.
Yup, thats what I thought at first too. But I’ve checked and no duplications in the automations.yaml. I can not see anything in connection related to any duplications on the automation’s logbook card. Also if I turn off the automation then it shows nothing new in the logbook.

If one automation causes duplicate messages, I’d expect both the disapear when you disable the automation, not one. So besides the automation, something is doing it too. Have you checked the entities list to see if the automation is listed twice, maybe under another entity id (_2) ?

Could it be IOS itself doing it? It would need to see the sensor change if the automation is disabled.

Maybe if you change the text in the automation, see if one or two messages change? You do not have a test instance of Home Assistant running and looking at the same sensor? Started experimenting with Node Red and have the same automation there? I don’t know?

I’ve double-checked that. There are no duplications. It feels like something is cached or I don’t know.

I also tried to change the notification in the automation. The “real” one is the automation, and the other one is the “cached” one.

If the iOS is doing itself, then all the HA notifications should be doubled. I assume.

I still don’t know how this can happen.

I do not have a test thing for that nor I did anything in Node Red. (and its weird it just came from nowhere - no updates, no modifications, no nothing)

Can this be an iOS HA app bug?

Also see this issue:

Since the rogue automation is not changing together with the new one, it almost certainly must be some old copy. Are you using Alexa? I heard somewhere it has some 'smart" features that try to learn from recent behavior. Although that was more trying to control devices rather than sending messages.

No, I’m not using Alexa and I did not have any former copy of that simple automation so I assume it could be a cached one somehow. I’m out of ideas.
Is there a way to ask support about that? or who can help in this case?

You don’t have by any chance two HA’s running (like test HA and “real” one)? Similar happened to me once and it took quite a while to figure it out that i forgot my test HA running and left enabled all automations on test HA, too, so all things were happening twice…

Thanks for the idea but no. I only have one HA on my server and on the whole network. :frowning:
I tried to rename the sensor as its integrated via a Fibaro integration (zwave sensor) but its so weird as the notification still comes up.
I can not believe this.
I assume something is wrong with the iOS app. I will try to reinstall on one of the fam’s iPhone. (Btw I assume it will solve the problem as its only happening on iPhones - no Macs or iPads are affected)

Is that automation which sends these messages? If so, disable that automation and see if you get only one message instead to two, or not at all.
Further, in automation there’s tracking where you can see what triggered it.
Lastly, there are a couple of automation modes: single, restart, queued…you can play with that to see if there’s any difference.

1 Like

Thanks but I’ve already done this. You can read if you scroll back a little. I already wrote about that even in the main topic.

Do you have a terminal available?

If so, go to your config directory and run this:

grep -ir <alias of your automation>

Then go into the .storage directory and run it again.

Provide us with the output.

Im not the power user but here is what Ive got:

➜  /config grep -ir "Notification: Entrance opening" .

./.storage/core.entity_registry:      {"aliases":[],"area_id":null,"categories":{},"capabilities":{"id":"1735230496993"},"config_entry_id":null,"created_at":"2024-12-26T16:28:30.820859+00:00","device_class":null,"device_id":null,"disabled_by":null,"entity_category":null,"entity_id":"automation.entrance_opening","hidden_by":null,"icon":null,"id":"1d99c86e74a4249748094bc81ab035fe","has_entity_name":false,"labels":[],"modified_at":"2024-12-27T17:31:55.614105+00:00","name":null,"options":{"conversation":{"should_expose":false}},"original_device_class":null,"original_icon":null,"original_name":"Notification: Entrance opening","platform":"automation","supported_features":0,"translation_key":null,"unique_id":"1735230496993","previous_unique_id":null,"unit_of_measurement":null},
./.storage/core.restore_state:      "state": {"entity_id":"automation.entrance_opening","state":"on","attributes":{"id":"1735230496993","last_triggered":"2025-02-26T17:34:03.805606+00:00","mode":"single","current":0,"friendly_name":"Notification: Entrance opening"},"last_changed":"2025-02-26T09:24:07.627897+00:00","last_reported":"2025-02-26T17:34:05.145748+00:00","last_updated":"2025-02-26T17:34:05.145748+00:00","context":{"id":"01JN1N58GX4KCQHF7HESMSK0C8","parent_id":"01JN1N58GWZAB4R41RYWY2A9X4","user_id":null}},
./automations.yaml:  alias: 'Notification: Entrance opening'
./home-assistant_v2.db:/{"name":"Notification: Entrance opening","entity_id":"automation.entrance_opening","source":"state of binary_sensor.kapu_entrance_sensor_0_1_131"}i
➜  /config cd .storage
➜  .storage grep -ir "Notification: Entrance opening" .
./core.entity_registry:      {"aliases":[],"area_id":null,"categories":{},"capabilities":{"id":"1735230496993"},"config_entry_id":null,"created_at":"2024-12-26T16:28:30.820859+00:00","device_class":null,"device_id":null,"disabled_by":null,"entity_category":null,"entity_id":"automation.entrance_opening","hidden_by":null,"icon":null,"id":"1d99c86e74a4249748094bc81ab035fe","has_entity_name":false,"labels":[],"modified_at":"2024-12-27T17:31:55.614105+00:00","name":null,"options":{"conversation":{"should_expose":false}},"original_device_class":null,"original_icon":null,"original_name":"Notification: Entrance opening","platform":"automation","supported_features":0,"translation_key":null,"unique_id":"1735230496993","previous_unique_id":null,"unit_of_measurement":null},
./core.restore_state:      "state": {"entity_id":"automation.entrance_opening","state":"on","attributes":{"id":"1735230496993","last_triggered":"2025-02-26T17:34:03.805606+00:00","mode":"single","current":0,"friendly_name":"Notification: Entrance opening"},"last_changed":"2025-02-26T09:24:07.627897+00:00","last_reported":"2025-02-26T17:34:05.145748+00:00","last_updated":"2025-02-26T17:34:05.145748+00:00","context":{"id":"01JN1N58GX4KCQHF7HESMSK0C8","parent_id":"01JN1N58GWZAB4R41RYWY2A9X4","user_id":null}},

Isn’t it wiser to look for the notification itself? If some duplicate exists under a different alias…

I do not have any duplicates. I only have one automation for this and ever had. No backup no test no nothing.
Even if I disable all the automations and opening the entrance all the iOS devices receiving a notification. But seems like a cached one because no entry of the current image taken by the cameras. Thats why I think its bugged.

Anything like that could help. I was just going by the hypothesis that the automation itself was duplicated. Running the same commands but looking for the notification’s text (or part thereof) is a good idea, I agree – @cisco.

Thanks for that.

Have you already reset the push notification IDs on the respective devices where you get this issue (it’s under the companion app settings)?

Did you maybe at any point create a test automation of sorts, using the same notification message?

From the output it doesn’t look like there’s a duplicate automation, but see Edwin’s point above.

This is a guess, but perhaps something is going wrong when states are restored upon startup. It’s hard to know. With time and effort one can maybe interrogate a running HA instance by attaching a debugger.

I have one very, very risky proposal, but you’ll have to make sure you have proper backups in place (including having tested your backups).

  1. Shut down HA.
  2. Keep the automation defined in YAML.
  3. Remove the JSON sections you found with my commands from the internal storage files. You only need to do this for core.entity_registry and core.restore_state. Don’t touch the DB (SQLite) file. Make sure you don’t break the JSON’s structure.
  4. Restart HA.
  5. Perform your test.

For example, make sure to remove everything from the opening brace to the closing one, including the trailing comma (unless it’s the last entry, in which case there will be no comma).

In core.entity_registry you can just delete the whole line:

       {"aliases":[],"area_id":null,"categories":{},"capabilities":{"id":"c39b4bb0-9a1d-475c-ac7d-ee93fbee8e69"},"config_entry_id":null,"created_at":"1970-01-01T00:00:00+00:00","device_class":null,"device_id":null,"disabled_by":null,"entity_category":null,"entity_id":"automation.handle_doorbell_alert_action","hidden_by":null,"icon":null,"id":"3df87a66232d6a3736c5df08ff286967","has_entity_name":false,"labels":[],"modified_at":"1970-01-01T00:00:00+00:00","name":null,"options":{"conversation":{"should_expose":false}},"original_device_class":null,"original_icon":null,"original_name":"Handle Doorbell Alert Action","platform":"automation","supported_features":0,"translation_key":null,"unique_id":"c39b4bb0-9a1d-475c-ac7d-ee93fbee8e69","previous_unique_id":null,"unit_of_measurement":null},

In core.restore_state you need to delete more than one line, so make sure to get the whole block:

    {
      "state": {"entity_id":"automation.handle_doorbell_alert_action","state":"on","attributes":{"id":"c39b4bb0-9a1d-475c-ac7d-ee93fbee8e69","last_triggered":"2025-02-27T11:47:31.440152+00:00","mode":"single","current":0,"friendly_name":"Handle Doorbell Alert Action"},"last_changed":"2025-02-27T13:41:27.965617+00:00","last_reported":"2025-02-27T13:41:27.965617+00:00","last_updated":"2025-02-27T13:41:27.965617+00:00","context":{"id":"01JN3T82RX90NDMTHDA9815QPQ","parent_id":null,"user_id":null}},
      "extra_data": null,
      "last_seen": "2025-02-27T15:11:41.898760+00:00"
    },

If you don’t feel comfortable with this, don’t do it, or if you have a friend or someone experienced with JSON that can hold your hand, that would be ideal. I can take no responsibility for this. :slight_smile:

Addendum:

If the above steps don’t help, try this recipe.

  1. Shut down HA.
  2. Remove automation defined in YAML, but keep a copy.
  3. Remove the JSON sections you found with my commands from the internal storage files. You only need to do this for core.entity_registry and core.restore_state. Don’t touch the DB (SQLite) file. Make sure you don’t break the JSON’s structure.
  4. Restart HA.
  5. Perform your test. You should get no notification.
  6. Stop HA.
  7. Add your automation in YAML again (and for good measure give it a new ID).
  8. Restart.
  9. Test.

Thanks! But I think its way over my knowledge.

Another thing I recognized today if I turn off an automation for the lobby lamps when triggered by motion, they are still turning on? How the heck this could happen?
I have no duplications. I’m totally shocked about the whole situation…

Try searching logbook at time when lights went on - what turned them on?