First add the feed you want using the UI
and enter your feed URL
to be sure to only get the latest news item configure the integration
and set to 1 entry
now you want to set up some text helpers to hold the data
ENSURE THEY ARE SET TO A MAX LENGTH OF 255
you should make one for:
RSS Title
RSS Description
RSS Link
RSS Date
now we need to fill these with data from the integration when new news arrives by triggering on the event
example automation:
alias: RSS Feed Reader
description: ""
triggers:
- trigger: event
event_type: feedreader
event_data:
feed_url: https://newsletter.openhomefoundation.org/rss/
conditions: []
actions:
- action: input_text.set_value
metadata: {}
data:
value: " {{ trigger.event.data.title }} "
target:
entity_id: input_text.rss_title
- action: input_text.set_value
metadata: {}
data:
value: " {{ trigger.event.data.description }} "
target:
entity_id: input_text.rss_description
- action: input_text.set_value
metadata: {}
data:
value: " {{ trigger.event.data.link }} "
target:
entity_id: input_text.rss_link
- action: input_text.set_value
metadata: {}
data:
value: " {{ trigger.event.data.published }} "
target:
entity_id: input_text.rss_date
mode: single
you should change the URL to match your feeds URL and update the helper entities as needed to point to where you want the data.
now you can create a markdown card on your dashbaord to display the information from the feed
example card:
type: markdown
content: |-
## {{states('input_text.rss_title')}}
### {{states('input_text.rss_description')}}
{{states('input_text.rss_link')}}
{{states('input_text.rss_date')}}
title: Latest From The Open Home Foundation
should look like this:
if it is currently showing no data you can either wait for the next RSS announce or you can reload the integration to force it to grab the most recent news item
Good day,
One thing I've learned from trial and error is the input text helpers have indigestion if the description returned is over 255 characters. Helpers are limited to 255 and the automation will fail. With a little help from ChatGPT, I've tested this which appears to work for stripping HTML tags and truncating what's passed to the helper.
{{ trigger.event.data.summary | striptags | truncate(250, True, '...') }}
I can test it again alongside your more knowledgeable advice, but I had problems setting the feed to "1". This is exactly what I want to do, but when I used "1" last night, the feed had not updated for 12 hours. The feed did not have any logbook entries about "detecting an update" , so nothing changed all night. I updated it to "2" and the feed immediately updated. Likely just because it forced a reload, but the single entry sat without firing for 12 hours.
Right now it's at "2", and I'll see if it updates in the next couple hours.
It's also not clear if the feed refreshes each time a new feed is published, or just once an hour. Reading around will get you both answers, because the configuration change to UI Setup killed the ability to specify the update interval in YAML. So a newcomer won't know it's just once an hour, and think it's not working at all. Someone in my situation has to make a change, and then wait a couple hours to see if the changes broke anything. It's very flaky and time consuming.
Right now, I have this automation.
I currently have the section for updating the
datetime
helper disabled, because I've gotten errors about formatting. I'm going to set it back to yourvalue
entry for now. You have atext
helper, not adatetime
?I'm happy to help you get some better documentation any way I can. Maybe it can help others be less frustrated. Current news is a great feature for dashboards, so this is a worthy cause.