📰 Lovelace: RSS Feed Parser Plugin/List Card

I need a bit of Newbie help with this please:

  1. Using HA v2021.4.0
  2. Installed feedparser custom component v0.1.5 via HACS
  3. Installed list-card as a custom repo via HACS
  4. Added the sample code to my configuration.yaml and restarted HA okay
  5. Checked in Developer > States > sensor.engineering_feed and it’s full of RSS articles each with fields title, link and image
  6. I go to one of my Dashboards and add a Custom Card. In the code editor, I paste in the sample code, and I ‘simplified’ it for testing to be:
type: 'custom:list-card'
entity: sensor.engineering_feed
title: Engineering
columns:
  - title: Title
    field: title

I saved the Custom Card and all I get on my Dashboard is a Custom Card that has title ‘Engineering’ and column title ‘Title’ and absolutely no articles listed. Why are they not being pulled from the sensor? What am I missing?

I haven’t messed around with uilovelace.yaml or sensor.py or any other bits of code - I assume I don’t have to do that if I’ve used HACS to install the two components and used the Custom Card code editor?

Apologies in advance for asking a dumb Newbie question.

You need to specify the feed_attribute: entries

1 Like

Thank you! I thought I had tried that already and saw no difference, but I’ve just tried it again and it’s working now. I must’ve screwed it up when I tried it before. Thanks for the help.

Actually I’ve now found that my problem seems to be:

 - title: Description
   field: description

Whenever I include this field in the custom card, it fails to populate with any RSS articles. If I remove that title/field, then it works (the field is correctly defined in my configuration.yaml as shown in the example code).

I’m also only getting the Home Assistant logo as the article images, but I’m aware others have mentioned this in their posts - so I’ll read those messages more carefully to figure out that problem.

Am I correct in thinking this custom component is just not pulling all of the designated ‘included’ fields from the RSS feed?

I’ve tried multiple feeds and added/removed the ‘inclusions’ to no avail. When I use Developer Tools > States > sensor.engineering_feed here’s what I see:

entries:
  - title: >-
      Where will Prince Philip's body be held and moved to before he is laid to
      rest?
    link: >-
      https://www.mirror.co.uk/news/uk-news/prince-philip-dukes-body-held-23886320
    image: 'https://www.home-assistant.io/images/favicon-192x192-full.png'
  - title: >-
      TV schedule change explained as Emmerdale, Corrie and EastEnders not on
      tonight
    link: >-
      https://www.mirror.co.uk/tv/tv-news/emmerdale-coronation-street-eastenders-not-23886423
    image: 'https://www.home-assistant.io/images/favicon-192x192-full.png'
  - title: >-
      Travelodge currently has family rooms in Cornwall from £20.75pp for the
      summer
    link: >-
      https://www.mirror.co.uk/travel/uk-ireland/travelodge-rooms-cornwall-20pp-july-23879194
    image: 'https://www.home-assistant.io/images/favicon-192x192-full.png'

The ‘image’ is always the HomeAssistant logo and the only fields pulled from the RSS are title, link and the home assistant image.

Does this custom component no longer work??

UPDATE:

Okay, I think I’ve understood my problem: if your configuration.yaml includes any ‘inclusion’ fields which don’t exist in the RSS feed, then it simply fails to pull back any of the subsequent fields into the sensor.

So now my configuration.yaml looks like this and pulls everything back:

  - platform: feedparser
    name: Engineering Feed
    feed_url: 'https://www.sciencedaily.com/rss/matter_energy/engineering.xml'
    date_format: '%a, %b %d %I:%M %p'
    inclusions:
    exclusions:

and I can use them in the list-card now.

Sorry if I’ve been spamming this thread a bit too much.

1 Like

im stucking at an related point, I got feed parser 0.1.5 installed on HassIO 2021.4.4 and I can’t get all info from my feed.
If I set title and summary I get my feed accordingly buuut I wanted to explore a bit further so added

  - platform: feedparser
    name: programm
    feed_url: 'https://www.texxas.de/tv/hauptsenderJetzt.xml'
    date_format: '%a, %b %d %I:%M %p'

but nothing also with

  - platform: feedparser
    name: programm
    feed_url: 'https://www.texxas.de/tv/hauptsenderJetzt.xml'
    date_format: '%a, %b %d %I:%M %p'
    inclusions:
    exclusions:

anyone an idea how to fix this? if I download the xml directly I can see some fields but they don’t get picked up (for instance: there is a field “descriptions” which doesn’t work, but with “summary” I get the information provided in this field)… so im totally lost, thought I got a bit deeper to it but nope

Hi I got this setup and working well, I’m using it for a news feed, which updates every few mins… How can I get the rss feed (and card on the frontend) to update every 5 mins? is that at all possible?
Thanks

Any ideas why the card doesn’t pick up the entries from the sensor?

sensors.yaml

Example of sensor content:
entries:

card:
type: ‘custom:list-card’
entity: sensor.rss_feed
title: Engineering Feed
feed_attribute: entries
columns:

  • title: ‘’
    type: image
    add_link: link
    field: image
  • title: Title
    field: title
    style: null
  • white-space: nowrap
  • title: Description
    field: description

Result:

I have an issue with this solution out of a sudden after upgrading to 2021.6.3 now.

Have not changed anything to the configuration or ui-lovelace files, also the sensor for the RSS feed is working and showing all the fields within the attributes (names unchanged as well). The list card is displayed (so also installed), title displayed but no feeds. Also tried with other sensors, but same result.

Any clue or anybody with the same issue?

@gunny I am having the same issue. I tried upgrading to 2021.6.5 and still see the same issue

I reviewed the developer tools - engineering feed entity and could see that I was no longer getting any ‘descriptions’. I since removed the following lines from the ‘custom:list-card’ and now I get the images and titles successfully.

Remove
style: null
white-space: nowrap
title: Description
field: description

1 Like

Thanks for your reply. I looked thru the list-card.js but have not found the lines you are mentioning. Can you give me a hint how to perform your fix?

Thx again!

What I am doing is a workaround to just get the images and titles as the descriptions seem to be missing from the attributes for the engineering feed. What I simply did was edit the card in my lovelace view to remove the descriptions.

Previous Card - No longer working
- type: custom:list-card
entity: sensor.engineering_feed
title: Engineering Feed
feed_attribute: entries
columns:
- title: ‘’
type: image
add_link: link
field: image
- title: Title
field: title
style:
- white-space: nowrap
- title: Description
field: description

Changed To
- type: custom:list-card
entity: sensor.engineering_feed
title: Engineering Feed
feed_attribute: entries
columns:
- title: ‘’
type: image
add_link: link
field: image
- title: Title
field: title

I hope the above helps to at least give you some information. But I guess this still needs to be fixed so we can get the description information back.

Thanks again. I have removed all style attributes and reduced the confi to it‘s bare minimum but still no result. I hope this gets fixed soon.

Thx for the support anyway.

Hello, I’m new to HA, but have installed a few cards from HACS. list-card dosen’t pull up for me, so I tried the lovelace guide of installing it manually and still no dice. Does anyone have a tip on how to get list-card installed?

btw Feedparser is installed and working according to developer tools.

Thank you!

1 Like

Would like to know that as well!

Click the 3 dots menu in the top right corner of HACS, select custom repositories, add the github address for the list card and select ‘frontend’ as the category.

1 Like

Hi,

I can’t get the images to show anymore. Any ideas what is wrong:

Here is my config.yaml part:

- platform: feedparser
  name: Engineering Feed
  feed_url: 'https://www.is.fi/rss/tuoreimmat.xml'
  inclusions:

Here is my lovelace.ui part that i want to get to work:

type: custom:list-card
entity: sensor.engineering_feed
title: ''
feed_attribute: entries
row_limit: 6
columns:
  - field: image
    title: ' '
    type: image
    add_link: link
  - title: ' '
    field: title
    add_link: link

And this is how i can get it to work without images:

type: custom:list-card
entity: sensor.engineering_feed
title: ''
feed_attribute: entries
row_limit: 6
columns:
  - title: 'Uutisotsikko '
    field: title
    add_link: link
    

Any ideas how to get the pics vissible again? it used to work earlier this year…

I’m getting an error (again) and no sensors are created/filled:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dateutil/parser/_parser.py", line 655, in parse
    ret = self._build_naive(res, default)
  File "/usr/local/lib/python3.9/site-packages/dateutil/parser/_parser.py", line 1241, in _build_naive
    naive = default.replace(**repl)
ValueError: second must be in 0..59

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 633, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/feedparser/sensor.py", line 110, in update
    value = parser.parse(value)
  File "/usr/local/lib/python3.9/site-packages/dateutil/parser/_parser.py", line 1374, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/dateutil/parser/_parser.py", line 657, in parse
    six.raise_from(ParserError(e.args[0] + ": %s", timestr), e)
  File "<string>", line 3, in raise_from
dateutil.parser._parser.ParserError: second must be in 0..59: 2021-09-08T12:15:1631099700Z

I’ve got the same error some days ago, then an update of feedparser arrived and it was working again for a few days. All of a sudden it stopped working :frowning:
I’m on HA 2021.9.4 and feedparser 0.1.7. Any ideas?

Can’t get the image out of this RSS feed. What should i use to get the image (tried already with the image parameter but no luck). Titles only works perfect.

The following is the response after the feedparser.

entries:
  - title: >-
      Afgelopen week bijna 40 procent meer positieve coronatests, ook fors meer
      opnames
    title_detail:
      type: text/plain
      language: null
      base: https://www.nu.nl/rss/Algemeen
      value: >-
        Afgelopen week bijna 40 procent meer positieve coronatests, ook fors
        meer opnames
    links:
      - rel: alternate
        type: text/html
        href: >-
          https://www.nu.nl/coronavirus/6169374/afgelopen-week-bijna-40-procent-meer-positieve-coronatests-ook-fors-meer-opnames.html
      - length: '0'
        type: image/jpeg
        href: >-
          https://media.nu.nl/m/qlbxndiazeci_sqr256.jpg/afgelopen-week-bijna-40-procent-meer-positieve-coronatests-ook-fors-meer-opnames.jpg
        rel: enclosure
      - href: >-
          https://nu.nl/coronavirus/6169375/grootste-aantal-coronapatienten-opgenomen-op-verpleegafdelingen-sinds-december.html
        rel: related
        title: >-
          Grootste aantal coronapatiënten opgenomen op verpleegafdelingen sinds
          december
        type: text/html
      - href: >-
          https://nu.nl/coronavirus/6169359/ziekenhuizen-bieden-weer-minder-zorg-aan-door-aanhoudende-coronadrukte.html
        rel: related
        title: Ziekenhuizen bieden weer minder zorg aan door aanhoudende coronadrukte
        type: text/html
      - href: >-
          https://nu.nl/coronavirus/6169338/voor-het-eerst-in-deze-coronagolf-wordt-coronapatient-naar-duitsland-verplaatst.html
        rel: related
        title: >-
          Voor het eerst in deze coronagolf wordt coronapatiënt naar Duitsland
          verplaatst
        type: text/html
    link: >-
      https://www.nu.nl/coronavirus/6169374/afgelopen-week-bijna-40-procent-meer-positieve-coronatests-ook-fors-meer-opnames.html
    summary: >-
      De afgelopen week testten opnieuw een recordaantal mensen positief op het
      coronavirus. In de weekupdate meldt het RIVM 153.957 positieve tests, een
      stijging van bijna 40 procent ten opzichte van een week eerder. Ook het
      aantal ziekenhuisopnames blijkt fors te zijn gestegen.
    summary_detail:
      type: text/html
      language: null
      base: https://www.nu.nl/rss/Algemeen
      value: >-
        De afgelopen week testten opnieuw een recordaantal mensen positief op
        het coronavirus. In de weekupdate meldt het RIVM 153.957 positieve
        tests, een stijging van bijna 40 procent ten opzichte van een week
        eerder. Ook het aantal ziekenhuisopnames blijkt fors te zijn gestegen.
    published: Tue, Nov 23 03:07 PM
    id: https://www.nu.nl/-/6169374/
    guidislink: false
    tags:
      - term: Algemeen
        scheme: null
        label: null
      - term: Coronavirus
        scheme: null
        label: null
    authors:
      - name: NU.nl
    author: NU.nl
    author_detail:
      name: NU.nl
    rights: 'copyright photo: ANP'
    rights_detail:
      type: text/plain
      language: null
      base: https://www.nu.nl/rss/Algemeen
      value: 'copyright photo: ANP'
----

friendly_name: Engineering Feed
icon: mdi:rss