You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Many warnings like "Unable to parse RFC-822 date from 2024-02-01T00:00:01Z." #127
Using Home Assistant 2024.03.0 in python 3.12 venv on Ubuntu LTS on VM in XCP-NG on intel server
Since upgrading from Feedparser release version to beta 0.2.0.b7 I get many warning like the one below for several feeds:
2024-03-13 08:49:37.703 WARNING (SyncWorker_13) [custom_components.feedparser.sensor] Feed Home Assistant: Unable to parse RFC-822 date from 2024-02-01T00:00:01Z. This could be caused by incorrect pubDate format in the RSS feed or due to a leapp second
Note the period character after "Z" in the date string in the warning message.
A good feed to test with is https://alerts.home-assistant.io/feed.xml. This feed has entries like below with valid W3CDTF (UTC timezone) datetimes (and no 'period character'):
<title>Ambiclimate integration will stop working April 1, 2024</title>
<link rel="alternate" href="https://alerts.home-assistant.io/alerts/ambiclimate/"/>
<updated>2024-02-01T00:00:01Z</updated>
<published>2024-02-01T00:00:01Z</published>
<id>https://alerts.home-assistant.io/alerts/ambiclimate/</id>
An extract from the resulting sensor looks like:
- title: Ambiclimate integration will stop working April 1, 2024
title_detail:
type: text/plain
language: null
base: https://alerts.home-assistant.io
value: Ambiclimate integration will stop working April 1, 2024
links:
- rel: alternate
href: https://alerts.home-assistant.io/alerts/ambiclimate/
type: text/html
link: https://alerts.home-assistant.io/alerts/ambiclimate/
updated: 2024-02-01T00:00:01Z.
published: 2024-02-01T00:00:01Z.
id: https://alerts.home-assistant.io/alerts/ambiclimate/
guidislink: false
Note, again, the period character in the dates in the above sensor. Is this correct?
I've tried three things, none of which help:
Adding this to config: 'date_format: '%Y-%m-%dT%H:%M:%SZ.' (period character in strftime definition)
Adding this to config: 'date_format: '%Y-%m-%dT%H:%M:%SZ' (no period character in strftime definition)
@wralb Thank you for reporting it. TIL that Atom Syndication Format exists.
Since the Home Assistant Alerts feed is published in this format, the code of the feedparser integration can not assume that all feeds are RSS 2.0 compliant, it also needs to work with the Atom feeds. I have a working implementation of time parsing already, but I still need to test it and do a new release. I would like to get to it in a few days. I will keep you posted.
A new beta, v1.0.0-beta2, should fix this. Atom/ISO 8601 dates such as 2024-02-01T00:00:01Z are now parsed directly instead of first failing as RFC 822, so the warning is gone. I checked https://alerts.home-assistant.io/feed.xml with the beta: the dates parse with no warnings. If a date can't be parsed at all, the original text is kept instead of failing the update.
How to try it
In HACS, open Feedparser → ⋮ → Redownload, and under Need a different version? pick v1.0.0-beta2. Then restart Home Assistant.
Your existing YAML sensors are imported into Settings → Devices & services → Feedparser automatically and keep their entity IDs. A Repairs notice then asks you to remove the YAML.
To go back: delete the Feedparser entries under Devices & services, redownload 0.1.12 and restart. Your YAML isn't changed.
Activity
ogajduse commentedon Mar 13, 2024
@wralb Thank you for reporting it. TIL that Atom Syndication Format exists.
Since the Home Assistant Alerts feed is published in this format, the code of the feedparser integration can not assume that all feeds are RSS 2.0 compliant, it also needs to work with the Atom feeds. I have a working implementation of time parsing already, but I still need to test it and do a new release. I would like to get to it in a few days. I will keep you posted.
feat: Enhance image detection and date parsing (v0.2.1)
iantrich commentedon Nov 14, 2026
A new beta, v1.0.0-beta2, should fix this. Atom/ISO 8601 dates such as
2024-02-01T00:00:01Zare now parsed directly instead of first failing as RFC 822, so the warning is gone. I checkedhttps://alerts.home-assistant.io/feed.xmlwith the beta: the dates parse with no warnings. If a date can't be parsed at all, the original text is kept instead of failing the update.How to try it
Release notes: https://github.com/custom-components/feedparser/releases/tag/v1.0.0-beta2
Please reply here with whether it works for you. If it doesn't, include the feed URL and your sensor options. Thanks!