Alright, I’ve figured out how to play the most recent episode of a podcast on my Home Assistant Voice PE… but it’s multiple steps, and not obvious. Does anyone have a suggestion on how to simplify this?
- Fetch the podcast with Feedreader.
- Create an input_text helper to store the podcast episode URL
- Use an automation to respond to feedreader events, and store the podcast episode URL in a text helper:
alias: "feedreader: Set NPR Up First episode URL" description: "" triggers: - trigger: event event_type: feedreader event_data: feed_url: >- https://feeds.npr.org/510318/podcast.xml conditions: [] actions: - action: input_text.set_value metadata: {} data: value: >- {{ trigger.event['data']['links']|selectattr('type','eq','audio/mpeg')|map(attribute='href')|first|trim('"') }} target: entity_id: input_text.npr_up_first_episode_url mode: single
- Create an automation to play the podcast episode URL:
alias: "Voice: play NPR up first" description: "" triggers: - trigger: conversation command: - "[play ][NPR ]up first" conditions: [] actions: - action: media_player.play_media data: media_content_type: music announce: false media_content_id: "{{ states('input_text.npr_up_first_episode_url') }}" target: device_id: "{{ trigger.device_id }}" mode: single