Update feedreader.markdown
Added additional example of feedreader automation to explain how to access data form the feed in the automation.
This commit is contained in:
parent
4edabe533e
commit
5493d33fea
1 changed files with 13 additions and 0 deletions
|
@ -41,6 +41,19 @@ automation:
|
||||||
entity_id: script.my_action
|
entity_id: script.my_action
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
automation:
|
||||||
|
- alias: Send notification of RSS feed title when updated
|
||||||
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: feedreader
|
||||||
|
action:
|
||||||
|
service: notify.notify
|
||||||
|
data_template: "{{ trigger.event.data.title }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
*Any field under the `<entry>` tag in the feed can be used for example `tigger.event.data.content` will get the body of the feed entry.
|
||||||
|
|
||||||
For more advanced use cases, a custom component registering to the `feedreader` event type could be used instead:
|
For more advanced use cases, a custom component registering to the `feedreader` event type could be used instead:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue