šŸŽ§ Lovelace Podcast Card/Plugin for gPodder

:headphones: Podcasts in Home Assistant :headphones:

Iā€™ve created a custom component/card for everyone to enjoy podcasts in Home Assistant. Design needs some polish and it might be missing some features, but Iā€™m excited to get it out to you all for consumption and to get feedback. Enjoy!

gPodder Custom Component | Podcast Custom Card

Home Assistant Podcast on gPodder

8 Likes

Great stuff Ian! Such a quick turnaround time!

1 Like

Anything for P & R :stuck_out_tongue_winking_eye:

1 Like
          - entity: sensor.gpodder
            type: custom:podcast-card
            name: Home Assistant Podcasts
            default_target: media_player.office_speaker
            show_player: true
            custom_player: true

So nothing shows up in Lovelace. I see sensor.gpodder and it has subscriptions.
I have loaded the podcast-card:

  - url: /customcards/github/custom-cards/podcast-card.js
    type: module

:rocket: Fix Attributes :rocket:

gPodder Component Release 1.0.2

@DavidFW1960 I had a pending change to the gPodder component that I neglected to push up. Try updating and see if that resolves the issues for you :+1:

1 Like

I just tried setting a device name and am getting a config validation error when I check configā€¦

Invalid config for [gpodder]: [device] is an invalid option for [gpodder]. Check: gpodder->gpodder->device. (See /config/configuration.yaml, line 384). Please check the docs at https://home-assistant.io/components/gpodder/

config

# Home Assistant Podcasts on gpodder
gpodder:
  username: !secret gpodder_user
  password: !secret gpodder_password
  device: homeassistant
  sensor:
    - enabled: true
      name: gPodder

AND now itā€™s working!!! Excellent. Thanks @iantrich

Also in consy.py down the bottom there is a typo:

# Defaults
DEAFULT_NAME = DOMAIN

Is that part of why I see the above error?

EDIT: I see the above typo in other files as well (in the component) so it seems ā€˜deliberaqteā€™?

I also moved the domain to the sensor list and itā€™s validating. I think the readme on github indicates itā€™s a variable at the same level as username etc, not in the sensor listā€¦

Curious, whatā€™s the reason for having ā€œsensorā€ as a list? Wonā€™t they all have the same data?

itā€™s to future proof the component.
Now itā€™s one sensor containing all the data.
someday it may make sense to break it up.
If the ā€œcoreā€ part of the config is already setup to handle multiple sensor types migration for the user will be easier.

Thatā€™s kind of what I figured. Mostly curious because I wanted do just that in my own custom component. It just looked a bit odd as a list with enabled as an option. If there were multiple sensors to configure, wouldnā€™t the existence in the list imply it should be enabled and exclusion would imply disabled?

Anyway, I donā€™t know that this is really the place to discuss. It just caught my eye since Iā€™ve been looking for a good example of how to do that.

Probably not :see_no_evil:
https://github.com/custom-components/gpodder/blob/master/custom_components/gpodder/__init__.py#L39 if you look at this you will see that the enabled part defaults to True so specifying that in the config is not really needed.

It might be a good topic to discuss further before more components start to follow that structure, if you @tboyce1 (or anyone else) feel like it, open an ā€œissueā€ here https://github.com/custom-components/blueprint :slight_smile:

1 Like

:headphones: Version 1.0.2 Released :headphones:

  • Style changes
  • Friendly names in entity picker

Ian can you checkā€¦ the device key has to be part of the list under sensor otherwise you get a configuration errorā€¦

IF you have your device name on gPodder set to homeassistant the minimum configuration is

gpodder:
  username: iantrich
  password: myawesomepassword

Yes I realise that. But if you have a different name then the docs are wrong for the config of the device nameā€¦

Specifically:

# Home Assistant Podcasts on gpodder
gpodder:
  username: !secret gpodder_user
  password: !secret gpodder_password
  device: homeassistant
  sensor:
    - enabled: true
      name: gPodder

Does not pass the config validation butā€

# Home Assistant Podcasts on gpodder
gpodder:
  username: !secret gpodder_user
  password: !secret gpodder_password
  sensor:
    - enabled: true
      name: gPodder
      device: homeassistant

Doesā€¦ The docs indicate the first one is correct but itā€™s not.

Ah, I see now what youā€™re referring to. Can you submit a PR?

I will Ianā€¦ just wasnā€™t sure if I was mistaken. Iā€™ll submit a PR for the docs presentlyā€¦

I have found a podcast that trips up something, its the triforce podcast: RSS feed Link

by the error bellow, it seems to be an issue in the card, probably caused by the exclamation mark in the podcast name

https://URL/local/podcast-card.js:2588:38 Uncaught SyntaxError: Failed to execute 'querySelector' on 'DocumentFragment': '#Triforce!' is not a valid selector.

Lame :slight_smile: can you log an issue on the repo with the details so I can track it a bit better? Thanks.

:headphones: Release 1.0.3 :headphones:

  • Extract mime type from feed