Integrating BBC RSS Feed into Home Assistant Dashboard Using Feedreader
To display the latest news item from the BBC RSS feed on your Home Assistant dashboard using the feedreader
integration, follow these steps:
1. Add the Feedreader Integration via the Home Assistant UI:
- Navigate to Settings > Devices & Services.
- Click on Add Integration.
- Search for and select Feedreader.
- When prompted, enter the RSS feed URL:
https://feeds.bbci.co.uk/news/rss.xml?edition=uk
- Complete the setup by following the on-screen instructions.
2. Create Helper Entities:
You'll need to create helper entities to store the title, description, link, and publication date of the latest news item.
- Navigate to Settings > Devices & Services > Helpers.
- Click on Create Helper and select Text.
- Name it
Newsitem Title.
- Repeat this process to create two more text helpers named
Newsitem Description
andNewsitem Link
.
- Name it
- Create a Datetime helper:
- Name it
Newsitem Date Time.
- Name it
3. Set Up Automation to Process New Feed Entries:
Create an automation that updates the helper entities when a new feed entry is detected.
- Navigate to Settings > Automations & Scenes.
- Click on Create Automation and choose Start with an empty automation.
- Configure the automation as follows:
Trigger:
- Trigger Type: Event
- Event Type:
feedreader
- Event Data:
feed_url:
https://feeds.bbci.co.uk/news/rss.xml?edition=uk
Actions:
- Action Type: Call Service
- Service:
input_text.set_value
- Target:
input_text.newsitem_title
- Value:
{{ trigger.event.data.title }}
- Service:
- Add similar actions for
input_text.newsitem_description,
input_text.newsitem_link,
andinput_datetime.newsitem_date_time,
setting their values to{{ trigger.event.data.description }},
{{ trigger.event.data.link }}
and{{ trigger.event.data.published }},
respectively.
4. Add a Markdown Card to Your Dashboard:
To display the latest news item on your dashboard, add a Markdown card with the following content:
- Navigate to your dashboard and click on Edit Dashboard.
- Click on Add Card and select Markdown.
- In the Content field, enter:
**[{{ states('input_text.newsitem_title') }}]({{ states('input_text.newsitem_link') }})** {{ states('input_text.newsitem_description') }} _Published on: {{ as_datetime(states('input_datetime.newsitem_date_time')).strftime('%B %d, %Y %H:%M') }}_
- Click Save to add the card to your dashboard.
5. Test the Setup:
To test without waiting for a new RSS feed entry, you can simulate a feedreader
event using the Developer Tools:
- Navigate to Developer Tools > Events.
- In the Event field, enter
feedreader
. - In the Event Data field, input a JSON object that mimics the data structure of a real feed entry, for example:
{ "feed_url": "https://feeds.bbci.co.uk/news/rss.xml?edition=uk", "title": "Sample News Title", "description": "Sample news description.", "link": "https://www.bbc.co.uk/news/sample-news", "published": "2025-01-12T13:32:46+00:00" }
- Click Fire Event to simulate the event.
- Check if the helpers are updated accordingly.
After setting up, check the Logs under Settings > System > Logs to ensure there are no errors related to the feedreader
integration or the automation.
By following these steps, your Home Assistant dashboard will display the latest news item from the BBC RSS feed using the feedreader
integration.