Lovelace: Upcoming Media Card

Thank you very much, i will share with others.

It doesn’t matter what version you select as long as it is different to the previous one. All the version setting does is break the caching and forces lovelace to reload it when it sees a new version.

RIP upcoming media card. Can’t get any of this to load again. Any reason why HACS put a bullet in this??

HACS didn’t. The author of this card made the repository read-only/archived.

They have changed a bit from that screenshot.

type: custom:upcoming-media-card
entity: sensor.kodi_recently_added_movies
title: Recently Added Movies
image_style: poster
date: ddmm
max: 6
box_shadows: false
border_color: transparent
accent_color: transparent
title_text: $title
line1_text: $rating - $runtime
line2_text: $day, $date
line3_text: $empty
line4_text: $empty
text_shadows: false
card_mod:
  style: >
    ha-card.type-custom-upcoming-media-card > div:nth-child(2) {
      display: flex;
      flex-wrap: wrap;
      margin: 0 0 0 20px !important;
    }

    div.kodi_poster {
      padding: 0 !important;
      margin: 0 auto 10px auto !important;
      width: 50%;
      display: flex;
      flex-direction: column;
    }

    div.kodi_container_poster {
      background-color: var(--disabled-text-color);
      padding: 0 !important;
      margin: 0 !important;
      border-radius: 10px;
      width: 90%;
    }

    div.kodi_poster > svg {
      width: 90%;
      padding: 5px 0 0 0 !important;
      margin: 0 0 -30px 0 !important;
    }  

    #main > div > div > svg > polygon {
      display: none;
    }

    #main > div > ha-icon {
      top: 7.5px;
      right: 7.5px;
      border: 2px solid white;
      border-radius: 50%;
      width: auto;
      height: auto;
      padding: 5px;
      transform: scale(0.75);
    }

    .kodi_line0_poster {
        font-size: 16px !important;
        font-weight: 700;
    }

    .kodi_line1_poster, .kodi_line2_poster, .kodi_line3_poster,
    .kodi_line4_poster {
        font-size: 14px !important;
    }

    .kodi_line3_poster, .kodi_line4_poster {
        display:none;
    }

1 Like

Thanks… it work

Hi David,

I tried your change and added [‘tmdb’] to line 113 and 115 of the .py file but I’m still having issues. My sensor populates and shows “online” but the sensor data is blank and just shows

data: 
friendly_name: Radarr_Upcoming_Media

I’m not sure if this issue is the same though. I had this working for a while and now this has been the issue for a few weeks or maybe months… My Sonarr and Plex setup is still working fine.

Adding my sensor…

- platform: radarr_upcoming_media
  api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXX
  host: XXX.XXX.XX.XXX
  port: 7878
  days: 14
  ssl: false
  max: 10

Which version of Radarr are you running? Mine is definitely working

It should be the latest version. I recently updated from the mono version to the .Net version. I believe v4.1

So I looked this morning and my sensor actually updated after the change to the python file. Maybe I needed to wait a little…

It now shows:

	data: 
- title_default: $title
  line1_default: $release
  line2_default: $genres
  line3_default: $rating - $runtime
  line4_default: $studio
  icon: mdi:arrow-down-bold

friendly_name: Radarr_Upcoming_Media

but the upcoming media card doesn’t display anything. I read further up that an adblocker might be preventing the covers from displaying. Could that also cause the full film information to not display? I can test this by turning off my pihole but besides that I am out of ideas…

edit: just confirmed radarr version 4.1.0.6175

@eric1905 (or anyone that’s gotten this to work again). I completely screwed things up. I am hoping someone would be kind enough to help me get this working again.

I also got the archive messages in HACS. I clicked on remove from HACs instead of ignore. After I rebooted HA, my cards completely stopped working. I wish I hadn’t done that. The cards were working fine before I clicked on remove

I copied back the directories and respective contents to EXACTLY where they used to be before I clicked on remove (see below paths):

\config\custom_components\plex_recently_added\*
\config\custom_components\sonarr_upcoming_media\*
\config\www\community\upcoming-media-card\*

I also verified that ui-lovelace.yaml still has the below entries in the file.

resources:
  - url: /hacsfiles/upcoming-media-card/upcoming-media-card.js
    type: module

After rebooting HA again, my cards still aren’t working.

What do I need to do for this to start working again? I am 100% certain I have put everything back to the way they were before when they were working; albeit getting the archive warning message in HACS.

I think you need to specify a version for the card. A dummy version is fine. Is the component(s) creating the sensors in dev-tools do you see them? Try also dev console in Browser (F12) and right clicking on refresh and selecting Empty Cache and hard reload. Might need to do a couple of times. Then close console and CTRL+R a few times as well. The cache can be a bastard to break (although specifying a version in the resource should break it)

I already tried adding appending a version number earlier per the advice of @eric1905 I even tried changing the version number to something else. It didn’t help. like below:

- url: /hacsfiles/upcoming-media-card/upcoming-media-card.j?v=0.4.4

I cleared cache, cookies, and reloaded a few times. I think there’s something else wrong. HACS still shows:

Previously, before I had clicked on Remove to the Archive warnings, I think my cards still worked even though I was getting the below Archive warnings. If so, I could restore from Supervisor backup; so I get the HACS archive warnings again (like the below screenshots). Then, click on SHOW to those warnings messages… then click on Ignore instead of Remove.

However, I want to make sure leaving them in HACS indefinitely (and clicking on ’Ignore’ is the best way to handle this. I would rather go through the extra hassle of removing it completely from HACS and installing it manually somewhere unrelated to HACS if that’s way is better to do it.

I totally removed from HACS - they aren’t getting any updates anyway. I still put it in /www/community/ though. If it’s not loading the resource make sure you downloaded the js in raw mode from github and make sure the path is right. Also there was a HACS bug recently so make sure that is up-to-date. Mine is happily working in the /www/community/upcoming-media-card Directory

I was able to get Upcoming Media Card working again by clicking on the “Not Loaded” red Upcoming Media Card, then clicking on the 3 dots on the top-right of the screen to Redownload Beta Version 0.4.4. Everything started working again without any Archived warning messages! Is Beta Version 0.4.4 any different than 0.4.3?

It looks like I am currently using: NemesisRE/upcoming-media-card which doesn’t appear to be archived.

Questions:
Is it okay for me to use this way indefinitely? I prefer to see it listed in HACS without any warnings so I remember that it’s still installed in the Home Assistant web interface. Are there any benefits (or drawbacks) to using it this way as opposed to removing it completely from HACS and manually installing it?

PS: It looks like I’m also using: NemesisRE/sensor.plex_recently_added in HACS without any archive warning messages.

1 Like

What integration/sensor do you use for plex? this one seems to also not work anymore : https://github.com/custom-components/sensor.plex_recently_added

I am getting the following error with this card since recent updates, I am using NemesisRE and have removed and reinstalled multiple times in association with the sonnar integration:

Platform error sensor.sonarr_upcoming_media - Integration ‘sonarr_upcoming_media’ not found.

I can find the sensor [sensor.sonarr_upcoming] in the developer-tools/state#

Ive had to comment out for the time being

Anybody found any solutions??

Yea, this integration seems totally borked… I cant even see it log anything while loading… Shame since there doesnt seem to be any alternative that I am aware of

testing this card with jellyfin
how do i switch between latest movies, latest tv-shows and next up?
now it only shows next up, and with no fanart
got it working with sonarr and radarr tho
jellyfin on the left

1 Like

This looks fantastic! would you happen to know how to add more columns to this so it fills a full lovelace screen?

Shot n the dark, is there a way to get this to fill an entire page with posters? like instead of just 1 row we could have multiple showing further dates?