Created
November 8, 2022 10:30
-
-
Save Didgeridrew/d17dde289b87afe7db84d4c1499a55b0 to your computer and use it in GitHub Desktop.
HA: English Word of the Day using RSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##################################################################### | |
| # This sensor relies on the feedparser custom component: | |
| # https://github.com/custom-components/feedparser | |
| ##################################################################### | |
| sensor: | |
| - platform: feedparser | |
| name: OED Word of the Day | |
| feed_url: "http://www.oed.com/rss/wordoftheday" | |
| date_format: "%a, %b %d %H:%M:%S %z" | |
| scan_interval: | |
| hours: 12 | |
| inclusions: | |
| - title | |
| - summary | |
| - published | |
| exclusions: | |
| - title_detail | |
| - links | |
| - link | |
| - summary_detail | |
| - id | |
| - guidislink | |
| template: | |
| - sensor: | |
| - name: "Word of the Day" | |
| state: > | |
| {% set obj = state_attr('sensor.oed_word_of_the_day','entries') | |
| | last %} | |
| {{ obj.title }} | |
| attributes: | |
| definition: > | |
| {% set obj = state_attr('sensor.oed_word_of_the_day','entries') | |
| | last %} | |
| {{- (obj.summary | string) | |
| .replace('\xa0', ' ') | |
| .replace(obj.title,'') | |
| .replace('OED Word of the Day: ','') }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment