Lovelace: Upcoming Media Card

Big thanks to @DavidFW1960 and @jOOc again. These guys were a huge help in troubleshooting date / time issues.

Always restart after updating components and if you’re not updating using tracker-card and/or custom-updater be sure that you are adding to a version number at the end of your lovelace resources when you update your cards like so:

resources:
- url: /local/custom-lovelace/upcoming-media-card/upcoming-media-card.js?v=0.1.2
  type: js

Updates!

  • Date and time issues seem to be solved
  • Added new config option for date format ( day/month, month/day ) see read me above.
  • Added attribute to radarr sensor to prepare for banner view ( banner view isn’t available yet! )
  • Possible fix for css conflicts between cards @swifty ( get back to me on that )
  • Locale is no longer required, remove it from your config!
1 Like

Awesome work and thanks for tracking that down.

Just a shout out about the tracker-card and custom-updater… I didn’t even know about those but they are AWESOME!

1 Like

@mayker now the card looks even better, keep up the good work!

One other thing I just noticed… if there is a date say:
11/9

It will say a time like this:
11/9, 11:00
That is to say without the am or pm… maybe it’s ignoring 12/24hr time?

If it’s tuesday it will say:
Tuesday 11:00am

Sonarr works great now. But when adding radarr platform i get a constant “Timer got out of sync. Resetting” in the log.

sensor.radarr_upcoming_media is there and populated as expected. Havent tried adding radarr in UI (lovelace) yet.

Made one more quick update to address time / date issues. More soon.

1 Like

What do you mean by constant, does it happen well after initial restart and how often? If you remove the component, does it still happen? What system are you running HA on?

Is there anything new about the movies?

Nothing good. Radarr doesn’t supply banners in their API and I was attempting to make something with fanart that resembles a banner image, but that turned out to be too unreliable as 3 movies in my upcoming didn’t have fanart.

So unless I find another way or another source for the images, unfortunately, no banner view. And when I say “another source”, it would have to be one that doesn’t require an API key or limitations on how many hits per day.

There is a issue on radarr’s github page requesting access to banner images via the API, but there has been no progress or talk for 6 months.

So there is no solution in the near future for movies ?;

No banner view for movies in the near future

Sucks, try to do something. Maybe I can only show caption?

So there is a /custom-lovelace/upcoming-media-card/images/radarr folder… How long are these jpg files retained?

Still haven’t found my issue with the radarr sensor…
I tried using the exact folder structure and made sure there was no permission issue…
The sensor gives me this error:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 344, in _async_add_entity
    await entity.async_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 243, in async_update_ha_state
    device_attr = self.device_state_attributes
  File "/home/homeassistant/.homeassistant/custom_components/sensor/radarr_upcoming_media.py", line 110, in device_state_attributes
    p = open(directory + 'poster' + str(attribNum) + '.jpg','wb')
FileNotFoundError: [Errno 2] No such file or directory: 'www/custom-lovelace/upcoming-media-card/images/radarr/poster1.jpg'

Timer got out of sync. Resetting. Wil happen every minute when I have the radarr component. Starts as soon as I start HA. Remove the radarr component and it stops. Running on a rpi3. The sensor is populated. But when adding in lovelace something is wrong. The pictures are broken and I can’t open the pictures from the folder either.

So maybe the messed up look ie the pictures not downloading properly is the reason for the timer issue?

@M203 @DavidFW1960 @Abeksis @jOOc

Looks like I have to rethink how I’m doing the radarr component. Sorry, dudes.

The Radarr component is going to need a complete rewrite and as such should be considered non-working. I apologize. As I said with the original sonarr card, I’m not a coder. I just tinker and really enjoy learning while making things. Will let you all know when there is news on the Radarr front. Thanks for your patience and help troubleshooting.

This card and the sonarr component are still functional and if you have any issues with them, please let me know.

1 Like

Really happy with the sonarr card! Thanks for all the work. Looking forward to the new radarr component and trying it out!

Thank you!

1 Like

Hey it’s all good here…
100% of the issues (except dates which are now fixed) have been due to caching… still having an issue with caching on the iOS app but that is not the addin causing it. I did delete all content in my browser and it’s come good but I can’t seem to do that in the iOS app (chrome and safari are working… just the app)

The way I’m grabbing images will just cause problems down the line, I’ve seen my error, but I may have been too quick to think I can’t solve it. Working on it now, might be a bit before the next update though…depending.