Add more examples. (#2979)

Closes ##2687
This commit is contained in:
Carlo Costanzo 2017-07-15 11:04:22 -04:00 committed by Fabian Affolter
parent ca80944d74
commit 7f704f9cbc

View File

@ -22,6 +22,7 @@ feedreader:
urls:
- https://home-assistant.io/atom.xml
- https://github.com/blog.atom
- https://hasspodcast.io/feed/podcast
```
Configuration variables:
@ -48,13 +49,17 @@ automation:
platform: event
event_type: feedreader
action:
service: notify.notify
data_template: "{{ trigger.event.data.title }}"
service: persistent_notification.create
data_template:
title: "New HA Podcast available"
message: "New Podcast available - {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %d%b%Y', true) }}"
notification_id: "{{ trigger.event.data.title }}"
```
*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.
For more advanced use cases, a custom component registering to the `feedreader` event type could be used instead:
For a drop in packaged complete example of Feedreader, you can use the [PodCast notifier](https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/packages/hasspodcast.yaml).
```python
EVENT_FEEDREADER = "feedreader"