improve docs (#38608)

This commit is contained in:
Michael 2025-04-19 11:38:29 +02:00 committed by GitHub
parent 8bcdfb0546
commit 3039f71256
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 43 additions and 7 deletions

View File

@ -261,6 +261,12 @@
link: /docs/configuration/events/
aliases:
- events
- term: Event entity
definition: >-
Events are signals that are emitted when something happens, for example,
when a user presses a physical button like a doorbell or when a button on a
remote control is pressed.
link: /integrations/event
- term: Floor
definition: >-
A floor in Home Assistant is a logical grouping of areas that are meant to

View File

@ -12,8 +12,8 @@ ha_platforms:
- event
ha_integration_type: integration
related:
- docs: /docs/configuration/
title: Configuration file
- docs: /common-tasks/general/#defining-a-custom-polling-interval
title: Defining a custom polling interval
ha_codeowners:
- '@mib1185'
---
@ -22,9 +22,23 @@ Add an RSS/Atom feed reader that polls feeds every hour and sends new entries in
{% include integrations/config_flow.md %}
{% configuration_basic %}
URL:
description: The URL of the RSS/Atom feed you want to integrate.
{% endconfiguration_basic %}
{% include integrations/option_flow.md %}
{% configuration_basic %}
Maximum feed entries:
description: The maximum number of entries to extract from each feed.
{% endconfiguration_basic %}
## Usage
Feedreader events can be used out of the box to trigger automation actions, e.g.:
### Automation
Feedreader events can be used out of the box to {% term trigger %} automation actions, e.g.:
```yaml
automation:
@ -58,18 +72,28 @@ automation:
{% endraw %}
Any field under the `<entry>` tag in the feed can be used for example `trigger.event.data.content` will get the body of the feed entry.
The `trigger.event.data` variable contains at least the following keys, there might be more depending on the data the configured feed is providing.
### Event
| Key | Description |
| --- | --- |
| `trigger.event.data.link` | The URL to this feed entry. |
| `trigger.event.data.title` | The title of this feed entry. |
| `trigger.event.data.description` | The description of this feed entry. |
| `trigger.event.data.content` | The content of this feed entry. |
An event entity will be created for each configured feed which always represents the latest entry of the feed.
### Event entity
An {% term "Event entity" %} entity will be created for each configured feed which always represents the latest entry of the feed.
### Video tutorial
This video tutorial explains how to set up the feedreader and show the latest news feed item on your dashboard in Home Assistant.
<lite-youtube videoid="Va4JOKbesi0" videotitle="How to view RSS feeds on your Dashboard in Home Assistant" posterquality="maxresdefault"></lite-youtube>
For more advanced use cases, a custom integration registering to the `feedreader` event type could be used instead:
### Event listener
For more advanced use cases, a custom integration registering to the `feedreader` {% term Event %} type could be used instead:
```python
EVENT_FEEDREADER = "feedreader"
@ -78,4 +102,10 @@ hass.bus.listen(EVENT_FEEDREADER, event_listener)
To get started developing custom integrations, please refer to the [developers](/developers) documentation
### Other examples
For a drop in packaged complete example of Feedreader, you can use the [PodCast notifier](https://github.com/CCOSTAN/Home-AssistantConfig/blob/22c19375ac5dcb49e0648aa16c431537407aa5e4/config/packages/hasspodcast.yaml).
## Remove the integration
{% include integrations/remove_device_service.md %}