Home Assistant Community

Lovelace: Upcoming Media Card

#370

This is great, thank you. Adding it to the list now.

0 Likes

#371

Hi, I’m getting a " local/custom-lovelace/upcoming-media-card/upcoming-media-card.js:7:1 Uncaught SyntaxError: Unexpected token <" error.

The component seems fine as it return the data to the entity.

The resource was added this way (the file is in the right location):

  • url: /local/custom-lovelace/upcoming-media-card/upcoming-media-card.js
    type: js

And the lovelace:

  • title: Sonarr
    icon: mdi:television-box
    cards:
    - type: custom:upcoming-media-card
    entity: sensor.sonarr_upcoming_media

Help would be appreciated :slight_smile: Thanks

0 Likes

#372

When copying & pasting from github always make sure you are copying from raw. When you’re looking at the file on github hit the raw button on the top right.

0 Likes

#373

OMFG!!! that was it! ROTFL, thanks!

Now I have two questions-

  1. The sensor itself have many lines, only 5 are presented in the ui. What should I do it I want all of it to be presented?

  2. can I somehow make 2 sensors, one for episodes of last week?

Thanks for the great card and for the assistance!

0 Likes

#374
  1. Look for the max config option in readme of the card.

  2. Short answer: no. Longer answer: if you’re using one of the “upcoming media” components they only show upcoming media, last week is no longer upcoming. 2 components show previously downloaded shows: Plex and Kodi.

0 Likes

#375

I can’t get this to work on my android phone using Chrome as a PWA.

I get the “Custom element doesn’t exist” message.

It works on a desktop chrome browser and my wife’s iPhone.

I have “javascript_version: latest” under my frontend: section of configuration.yaml so not sure what else it might be?

frontend:
  javascript_version: latest

EDIT - resolved by refreshing the lovelace UI using the refresh option in the top right corner of the lovelace UI. The issue (below) with tracker card remains though.

0 Likes

#376

Also, I have it under my resources as follows:

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

but it doesn’t show under my custom tracker card. (I have tracker card set to show all and this item is listed but does not show as installed).

0 Likes

#377

Hello, i’ve tried installing the Trackt sensor and i get an error at the OAuth verification:



what do i put in the URI section of the Trakt app?
thanks!

0 Likes

#378

Try “urn:ietf:wg:oauth:2.0:oob” for the Redirect URI in your trakt application. Then you get the PIN code.

1 Like

#379

Thanks that worked!! I think I changed something that i shouldn’t have.

0 Likes

#380

I’m in the process of trying to set this up, but I must be doing something dumb as all I’m getting is a white screen on the lovelace UI. This is what my ui-lovelace.yaml file looks like:

title: Test

resources:

  • url: /local/custom-lovelace/upcoming-media-card/upcoming-media-card.js?v=0.1.2
    type: js
    cards:
  • type: custom:upcoming-media-card
    entity: sensor.sonarr_upcoming_media
    title: Upcoming TV
    image_style: fanart
  • type: custom:upcoming-media-card
    entity: sensor.radarr_upcoming_media
    title: Upcoming Movies
    image_style: fanart
  • type: custom:upcoming-media-card
    entity: sensor.kodi_recently_added_tv
    title: Recently Added Episodes
    image_style: fanart
  • type: custom:upcoming-media-card
    entity: sensor.kodi_recently_added_movies
    title: Recently Added Movies
    image_style: fanart

What am I doing wrong? When I look at the page and click on Console I see the following error: TypeError: this.lovelace.config.views is undefined.

0 Likes

#381

I figured out what my problem was. As with a lot of the other examples from the documentation, a lot of things that are required weren’t included in the examples for any of the views I was looking at. I fixed it by updating my config to look like the following:

resources:

  • url: /local/custom-lovelace/upcoming-media-card/upcoming-media-card.js
    type: js

name: Testing
views:

  • title: Movies
    panel: false
    cards:
    • type: custom:upcoming-media-card
      entity: sensor.radarr_upcoming_media
      title: Upcoming Movies
      image_style: fanart
      flag: false
      clock: 24
  • title: TV
    panel: false
    cards:
    • type: custom:upcoming-media-card
      entity: sensor.sonarr_upcoming_media
      title: Upcoming TV Shows
      image_style: fanart
      flag: false
      clock: 24
0 Likes

#382

I would suggest checking out the Lovelace tutorial: https://www.home-assistant.io/lovelace/how-it-works/

Most custom card’s won’t explain how to setup Lovelace views as it’s beyond the scope of the card. Also be sure to use code blocks when posting code to the forum as formatting is crucial. The banner at the top of every forum page explains how.

0 Likes

#383

Hi @mayker,

Thanks for this card, it works and looks great. I’m using it with iantrich’s trakt sensor which works well also. Is there any way to configure your card so that it only shows today’s and future entries?

My trakt sensor shows yesterday’s too. I’m not sure if those will still be there tomorrow or not as I’ve just started using this yesterday. I’m not sure if this is by design with that sensor or if I have something wrong in my config.

If I go the trakt website calendar, it shows only upcoming media for today and future programs. I tried to dig though the github site and the 373 posts in this thread, but couldn’t find the answer. Rebooted a few times. Not getting any trakt sensor errors in the log.

I’ll tag @iantrich also in case he’s willing to chime in.

Thanks…

1 Like

#384

The trakt API happens to return old shows. I could make sure that things are in the future, as it has bugged me a bit, but not a top priority for me at the moment. Looking to add up next calendar first.

2 Likes

#385

I’d much prefer this be a function of the component rather than the card, since some components (plex, kodi) only show items that have already aired/downloaded. I obviously didn’t realize that would be the case when naming this card :slight_smile:

2 Likes

#386

New sensor.trakt :tv:version, v0.0.9, released; removes old shows from your calendar. Thanks @PlayedIn!

2 Likes

#387

Wanting to get both radarr and sonarr upcoming and plex last added to work on my raspi 3b+ running latest hassio.
All instructions refer to ui-lovelace.yaml, and there is no such file on my system…so I am at a loss sadly.

System HassOS 2.8
Deployment production
Version 145
Latest version 145
0 Likes

#388

I’m aware this is a me issue, but I can’t get radarr to connect it says can’t find host. Just to verify what ip am I supposed to be adding as the host? My radarr is on localhost:3435

0 Likes

#389

so standard is 7878… you changed that? What IP:port do you use on your PC to access?

1 Like