Lovelace: Upcoming Media Card

I have followed instructions, at least i thought i had. and when I load the card for this, i get the follwoing error:

Here is my ui-lovelace config for this card:

title: Media Servers
panel: true
icon: mdi:monitor-dashboard
cards:
 - type: custom:upcoming-media-card
   entity: sensor.sonarr_upcoming_media

The sensor has data in it when queried in the HA ui. Fresh install of the customer card.

-sam

Did you include the resources portion at the top of your lovelace code as well?

Crud, had a typo usr instead of url in that section. Thanks for the reply

Ok, so new problem, I saw it mentioned earlier in the thread but di dnot see any resolution. The Plex sensor fails to set up with the error:

2019-01-03 20:59:30 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform plex_recently_added
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/sensor/plex_recently_added.py”, line 47, in setup_platform
add_devices([PlexRecentlyAddedSensor(hass, config)], True)
File “/config/custom_components/sensor/plex_recently_added.py”, line 67, in init
self.server_name, self.token)
TypeError: ‘NoneType’ object is not iterable

I do get info when i query the plex api manually.

I think I found it, currently rebooting, host and server_name are not interchangable…that was it…thanks for all the support

Well that was pretty painless :slight_smile:

Trakt integration!! :tada:

Edit: Spoke too soon. Just realized I don’t a timestamp properly rendering. Will check that out tomorrow

4 Likes

Updates:

Couple of quick ones.

  • Fix an issue with the card where “flag: false” was still displaying the flag.
  • Fix for a Plex component issue that caused images to not display on some systems.

Ayyyy
Trakt support in next sensor release

5 Likes

That’s awesome! Thanks @iantrich, adding the component to the list now!

1 Like

First Lovelace card i ever got working…awesome!! Thank you

1 Like

I keep getting this error however it looks as though I’ve set up correctly

image

The steps I have taken are

  1. Added trakt sensor to HA and activated (appears to be working fine)

  2. added resource with following code:

  • url: /local/custom-ui/upcoming-media-card/upcoming-media-card.js?v=0.3.4
    type: js
  1. added javascript_version: latest to configuration.yaml

  2. added card to lovelace with:

  - type: custom:upcoming-media-card
    entity: sensor.trakt_upcoming_calendar

what have I missed?

Your resource url looks off, should be “custom-lovelace” not “custom-ui” :

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

does it have to be that path? all my files are in custom_ui so that path is accurate

I imagine any path would be fine as long as that path is correct (you mentioned 2 different folder names in your posts “custom_ui” and “custom-ui”). That URL just looked like it might have been a mistake.

What data is the sensor displaying?

yep - was a typo, embarrassing - thanks!

1 Like

No worries, happens to all of us.

Not me. I never make mistakes :wink:

Nice work on this! Started work on a custom component for Kodi to pull in recently added episodes and movies to the Kodi library. TV shows worked well, just need to clean it up and also add a sensor for movies before putting it up somewhere on github.

3 Likes

Awesome, looking forward to it!

I can’t seem to load radarr data into home-assistant (dev-state). Not sure what to do from here… reinstalled radarr on another machine so that port number was the same, it says online but no data, keep getting this error:

http://192.168.1.214:8123/local/custom-lovelace/upcoming-media-card/upcoming-media-card.js?v=0.1.2:19:45 Uncaught TypeError: Cannot read property ‘icon’ of undefined

downloaded new python code for radarr, not sure what else to try

Edit: i put the sensor back in the config.yaml file and rebooted, now it says it can’t seem to find it, even though i have the tab open, i installed radarr on ubuntu (opened the port) and can even ping it