Lovelace: Upcoming Media Card

“sensor.sonarr_upcoming” is the default HA sonarr component and the fact that it is empty points to a problem with either sonarr or your config. The sensor that appears when you install the sonarr component for this card is “sensor.sonarr_upcoming_media”, but if the default sonarr component doesn’t work with your configuration, mine won’t either.

Have you installed the component found in the read me at the top of this thread?

I can understand the confusion and should probably rename my sensor to be more apparent.

connecting on https??? do you connect to HA on a local ip address with https?

Is there a URL to use Custom_updater with this?
Maybe it’s a obvious one but not sure…

You actually don’t need one at all. The upcoming media card is part of the official custom cards repo: https://github.com/custom-cards.

I’m sorry, what does that mean technically?

The tracker-card (and the custom_updater component which it uses) by default supports the custom cards and and custom components repo (if enabled in your configuration.yaml). So you don’t need an additional url, https://github.com/custom-components/custom_updater/wiki/Installation#configuration-option-track.

ah ok, I get it, thanks for explaining, I appreciate it :slight_smile:

Hey mayker,

i have all component installed, But it is not displaying anything in the frontend although it is showing the sensor.sonarr_upcoming_media contains the data.

What’s your setup in lovelace?

Updates!

Card:

  • Card now reads JSON from components
  • Uses entity instead of service so devs can avoid naming their sensor “_upcoming_media”.
  • Replaced download notification with notification flag that includes an mdi icon
  • Card receives defaults from component’s json for icon and text content
  • Keywords can be used to build your own string with attributes. More on this below.
  • Styling changes
  • Runtime added with conversion of minutes to either “01:23” format for > 1 hour or “23 min” for <
  • Added true getCardSize() , but since the card sizes dynamically after getCardSize() is run its based on average size. (This helps with positioning within lovelace)
  • Poster fallback for fanart images now happens in card instead of component
  • Fixed shadow config
  • Should have fixed bug where card would appear empty if only 1-2 items were available. ( was unable to replicate, but iteration over items has changed significantly. )
  • New items! number (“S01E09”) , runtime (“01:23”) or (“23 min”) , genres (“Action, Adventure, Animation”)
  • Added a fourth line of text.

The biggest change here is how the text content for each line is handled. You can now write out your own string for each line using keywords. Example: line1_text: ‘Runtime: $runtime’ becomes Runtime: 23 min. See the readme for more info on what keywords you can use and how to handle multiple keywords on one line.

Components:

  • Now use JSON data instead of multiple attributes. Should help others develop for the card, iteration over items, and support.
  • Added the new items. Number, runtime, and genres.

Radarr:

  • Added option to hide theater releases.
1 Like

Will be updating screenshots soon as the ones in the readme are out of date now and I need to add an example of the new notification flag. Think plex’s unwatched flag with the ability to have an icon on it. Speaking of, I’m still working on the plex component, time permitting it’ll be coming soon.

Well that killed my card!
I was getting a red screen but now it’s just throwing up an error:


https://domain.duckdns.org:xxxxx/local/custom-lovelace/upcoming-media-card/upcoming-media-card.js?v=0.2.2:16:49 Uncaught TypeError: Cannot read property 'attributes' of undefined

Here is my lovelace:

  - id: 5  # Automatically created id
    title: TV & Movies
    icon: mdi:kodi
    panel: true
    cards:
      - id: xxx
        type: custom:column-card
        cards:
          - type: custom:upcoming-media-card
            entity: sensor.sonarr_upcoming_media
#           service: sonarr
            title: Sonarr Upcoming
            image_style: poster

etc

Does the sensor appear? What’s the info displayed in the data attribute? Did you restart after updating the components?

yes the sensor is valid in frontend (note it doesn’t have _card as in your example)
I don’t understand data attribute?
Yes I restarted.

I think it’s not liking the custom column card. If I remove that I only get the sonarr. I’ll PM my full lovelace.

Yeah the _card was a mistake by me. Fixed in readme on here. On mobile so a bit limited atm

Thanks for the update. Brilliant.

since update, I get this error on the cards now (was fine before)

http://192.168.1.9:8123/local/custom-lovelace/upcoming-media-card/upcoming-media-card.js:192:31 Uncaught TypeError: Cannot read property 'match' of undefined

Does the sensor show up (sensor.sonarr_upcoming_media)?
If so, what data does it display?

yes it’s there