Feedreader duplicates entries after restart HA

I have this in my configuration…

feedreader:
  urls:
    - https://www.home-assistant.io/atom.xml
  scan_interval:
    minutes: 5
  max_entries: 10

automation:
  - alias: Send Latest News
    initial_state: 'on'
    trigger:
      platform: event
      event_type: feedreader
    action:
      service: notify.telegram
      data_template:
        title: ""
        message: >-
          <a href="{{ trigger.event.data.link }}">{{ trigger.event.data.title }}</a>

Each time I restart my HA, I will receive the same entries in my Telegram even though they have been sent before. Is anyone facing this issue? Any solution to make it stop sending duplicates?

The feedreader component is trying to extract the publication date from each entry in the feed by looking for a published date. If available, it finds the newest date in all entries, stores the date in a file, and on the next update ignores all entries published before that date.
While HA is running, the last update’s etag is sent to the server to ensure to only retrieve an update from the server if there was a change.

The feed you have configured does not define published, but only updated and hence the above logic does not kick in, the last timestamp is not stored, and on a restart, the feed is just treated as brand new.
I would expect that you receive all entries being processed again each time the feed updates on the server side (i.e. a new post is published), not only when restarting HA.

The solution would be to change the business logic of the feedreader and process updated dates as well.

1 Like

thanks for your detailed explanation. based on that, i got the idea of using feedburner to optimize the feed using SmartFeed and Convert Format Burner to RSS 2.0. After that I just use the feedburner generated feed and now no more duplicates!