Lovelace: Upcoming Media Card


#186

Clear cache?


#187

Yep - tried incognito mode too just to be sure, no change unfortunately.


#188

this is my lovelace

  • type: custom:upcoming-media-card
    service: radarr
    title: Upcoming
    image_style: fanart
    text_shadows: off
    download_color: rgb(102,255,0,1)
    clock: 24
    max: 10

Works great


#189

@M203 Download color is no longer used as it’s been replaced with the notification flag. Shadow config changed to boolean a few versions ago so you should make it: text_shadows: false. Sorry, things have changed quite a bit over the last few versions, but config options should remain the same from here on out.

@swifty The error just tells me the card cannot see your sensor, but your setup looks fine and the sensor is reporting the correct JSON as far as I can tell. Are you using javascript_version: latest in your configuration.yaml? Even though I changed to entity instead of service, I left the code in for service so either should still work.


#190
banner1: https://www.thetvdb.com/banners/graphical/5ba3fac3a4813.jpg
poster1: https://www.thetvdb.com/banners/_cache/posters/5ba0336e098e0.jpg
fanart1: https://www.thetvdb.com/banners/_cache/fanart/original/5bbce25777d44.jpg
extrainfo1: ★ 9.4 - BBC One
title1: Doctor Who (2005)
subtitle1: Arachnids in the UK
airdate1: 2018-10-28T18:45:00Z
hasFile1: false
info1: S11E04
banner2: https://www.thetvdb.com/banners/graphical/5b7efe73ec3bd.jpg
poster2: https://www.thetvdb.com/banners/_cache/posters/5b7c9d5a28aff.jpg
fanart2: https://www.thetvdb.com/banners/_cache/fanart/original/311711-10.jpg
extrainfo2: ★ 8.7 - NBC
title2: The Good Place
subtitle2: A Fractured Inheritance
airdate2: 2018-11-02T00:30:00Z
hasFile2: false
info2: S03E06
banner3: https://www.thetvdb.com/banners/graphical/5ba3fac3a4813.jpg
poster3: https://www.thetvdb.com/banners/_cache/posters/5ba0336e098e0.jpg
fanart3: https://www.thetvdb.com/banners/_cache/fanart/original/5bbce25777d44.jpg
extrainfo3: ★ 9.4 - BBC One
title3: Doctor Who (2005)
subtitle3: The Tsuranga Conundrum
airdate3: 2018-11-04T18:45:00Z
hasFile3: false
info3: S11E05
banner4: https://www.thetvdb.com/banners/graphical/75978-g6.jpg
poster4: https://www.thetvdb.com/banners/_cache/posters/75978-13.jpg
fanart4: https://www.thetvdb.com/banners/_cache/fanart/original/75978-13.jpg
extrainfo4: ★ 8.6 - FOX (US)
title4: Family Guy
subtitle4: Regarding Carter
airdate4: 2018-11-05T02:00:00Z
hasFile4: false
info4: S17E05
banner5: https://www.thetvdb.com/banners/graphical/5ba3fac3a4813.jpg
poster5: https://www.thetvdb.com/banners/_cache/posters/5ba0336e098e0.jpg
fanart5: https://www.thetvdb.com/banners/_cache/fanart/original/5bbce25777d44.jpg
extrainfo5: ★ 9.4 - BBC One
title5: Doctor Who (2005)
subtitle5: Demons of the Punjab
airdate5: 2018-11-11T18:45:00Z
hasFile5: false
info5: S11E06
banner6: https://www.thetvdb.com/banners/graphical/75978-g6.jpg
poster6: https://www.thetvdb.com/banners/_cache/posters/75978-13.jpg
fanart6: https://www.thetvdb.com/banners/_cache/fanart/original/75978-13.jpg
extrainfo6: ★ 8.6 - FOX (US)
title6: Family Guy
subtitle6: Stand By Meg
airdate6: 2018-11-12T02:00:00Z
hasFile6: false
info6: S17E06
banner7: https://www.thetvdb.com/banners/graphical/75978-g6.jpg
poster7: https://www.thetvdb.com/banners/_cache/posters/75978-13.jpg
fanart7: https://www.thetvdb.com/banners/_cache/fanart/original/75978-13.jpg
extrainfo7: ★ 8.6 - FOX (US)
title7: Family Guy
subtitle7: The Griffin Winter Games
airdate7: 2018-11-19T02:00:00Z
hasFile7: false
info7: S17E07
friendly_name: Sonarr_Upcoming media

#191

Means the JSON is undefined. Does your sensor appear, if so whats the data?


#192

banner1: https://www.thetvdb.com/banners/graphical/5ba3fac3a4813.jpg
poster1: https://www.thetvdb.com/banners/_cache/posters/5ba0336e098e0.jpg
fanart1: https://www.thetvdb.com/banners/_cache/fanart/original/5bbce25777d44.jpg
extrainfo1: ★ 9.4 - BBC One
title1: Doctor Who (2005)
subtitle1: Arachnids in the UK
airdate1: 2018-10-28T18:45:00Z
hasFile1: false
info1: S11E04
banner2: https://www.thetvdb.com/banners/graphical/5b7efe73ec3bd.jpg
poster2: https://www.thetvdb.com/banners/_cache/posters/5b7c9d5a28aff.jpg
fanart2: https://www.thetvdb.com/banners/_cache/fanart/original/311711-10.jpg
extrainfo2: ★ 8.7 - NBC
title2: The Good Place
subtitle2: A Fractured Inheritance
airdate2: 2018-11-02T00:30:00Z
hasFile2: false
info2: S03E06
banner3: https://www.thetvdb.com/banners/graphical/5ba3fac3a4813.jpg
poster3: https://www.thetvdb.com/banners/_cache/posters/5ba0336e098e0.jpg
fanart3: https://www.thetvdb.com/banners/_cache/fanart/original/5bbce25777d44.jpg
extrainfo3: ★ 9.4 - BBC One
title3: Doctor Who (2005)
subtitle3: The Tsuranga Conundrum
airdate3: 2018-11-04T18:45:00Z
hasFile3: false
info3: S11E05
banner4: https://www.thetvdb.com/banners/graphical/75978-g6.jpg
poster4: https://www.thetvdb.com/banners/_cache/posters/75978-13.jpg
fanart4: https://www.thetvdb.com/banners/_cache/fanart/original/75978-13.jpg
extrainfo4: ★ 8.6 - FOX (US)
title4: Family Guy
subtitle4: Regarding Carter
airdate4: 2018-11-05T02:00:00Z
hasFile4: false
info4: S17E05
banner5: https://www.thetvdb.com/banners/graphical/5ba3fac3a4813.jpg
poster5: https://www.thetvdb.com/banners/_cache/posters/5ba0336e098e0.jpg
fanart5: https://www.thetvdb.com/banners/_cache/fanart/original/5bbce25777d44.jpg
extrainfo5: ★ 9.4 - BBC One
title5: Doctor Who (2005)
subtitle5: Demons of the Punjab
airdate5: 2018-11-11T18:45:00Z
hasFile5: false
info5: S11E06
banner6: https://www.thetvdb.com/banners/graphical/75978-g6.jpg
poster6: https://www.thetvdb.com/banners/_cache/posters/75978-13.jpg
fanart6: https://www.thetvdb.com/banners/_cache/fanart/original/75978-13.jpg
extrainfo6: ★ 8.6 - FOX (US)
title6: Family Guy
subtitle6: Stand By Meg
airdate6: 2018-11-12T02:00:00Z
hasFile6: false
info6: S17E06
banner7: https://www.thetvdb.com/banners/graphical/75978-g6.jpg
poster7: https://www.thetvdb.com/banners/_cache/posters/75978-13.jpg
fanart7: https://www.thetvdb.com/banners/_cache/fanart/original/75978-13.jpg
extrainfo7: ★ 8.6 - FOX (US)
title7: Family Guy
subtitle7: The Griffin Winter Games
airdate7: 2018-11-19T02:00:00Z
hasFile7: false
info7: S17E07
friendly_name: Sonarr_Upcoming media


#193

You either need to update your components or restart. That is not how the data is displayed in the new versions.


#194

Ah so thats it! Thanks for the help and quick reply!


#195

Upcoming media card is really great. Thanks for all your work on it. Will there be a recent downloads (Plex). Or do you have any other ideas? I am curious since you have done such a great job on this.


#196

Plex is in the works, but a combination of my python skills not being great and limited free time have slowed progress a bit.


#197

Yes, I have JavaScript set to latest in my configuration.

I just updated Hassio to the latest 0.81.0 but still no luck…


#198

Hi,

First off, this component is great, really looks good, thanks for sharing.

I see some users have the “TypeError: Cannot read property ‘airdate’ of undefined” problem. I too have had this issue BUT I have noticed that it only happens when Sonarr returns only one (1) show. If I increase my sonarr days so more results get returned then the problem goes away.

Just though I would let you know, hopefully an easy fix.


#199

Awesome, thank you. Very helpful.


#200

@Twit

Did a bit of testing on this and I’m unable to recreate the issue. Forced each component to return a single show in a few different ways and all seems to be fine. Anyone else run into this issue with the recent versions of the card?

@swifty

See if extending your days to include more than one result fixes your issue. Very interested in the result.


#201

Nope, unfortunately that doesn’t fix it - I extended my days to 30 which now includes 4 items , still the same error.


#202

I only installed it yesterday so pretty sure I’m on the latest (0.2.6). I’ll let you know if it does it again, hopefully just a glitch on my end.

Also this does not appear in my Tracker Card (the sonarr & radarr components just showed up). I only started with lovelace yesterday so it’s all new to me but both the sonarr and radarr component have version numbers in the js code but this component does not. Should it show up on my tracker card?


#203

I think under the custom_updater configuration you need to have

Track:
  - cards
  - components

That’s what I have and I see all 3 components.


#204

Hi
Also have problem with this:

Chrome:
Uncaught TypeError: Cannot read property ‘airdate’ of undefined
at item (upcoming-media-card.js:247)
at HTMLElement.set hass [as hass] (upcoming-media-card.js:248)
at config.cards.map.cardConfig (d076e229b8879acac643.chunk.js:1994)
at Array.map ()
at HTMLElement._createCards (d076e229b8879acac643.chunk.js:1994)
at Object.runMethodEffect [as fn] (app-945b88ed.js:1067)
at runEffectsForProperty (app-945b88ed.js:1067)
at runEffects (app-945b88ed.js:1067)
at HTMLElement._propertiesChanged (app-945b88ed.js:1067)
at HTMLElement._flushProperties (app-945b88ed.js:1438

lovelace config:

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

  • type: custom:upcoming-media-card
    entity: sensor.sonarr_upcoming_media

sensor:

data: [{“title_default”: “$title”, “line1_default”: “$episode”, “line2_default”: “$release”, “line3_default”: “$rating - $runtime”, “line4_default”: “$number - $studio”, “icon”: “mdi:arrow-down-bold”, “title”: “The Walking Dead”, “episode”: “The Obliged”, “flag”: false, “airdate”: “2018-10-29T01:00:00Z”, “number”: “S09E04”, “runtime”: 45, “studio”: “AMC”, “rating”: “\u2605 9.0”, “release”: “$day, $time”, “poster”: “https://www.thetvdb.com/banners/_cache/posters/5b64ff76e1805.jpg”, “fanart”: “https://www.thetvdb.com/banners/_cache/fanart/original/5b64fce0a1129.jpg”, “genres”: “Adventure, Drama, Horror”}, {“title”: “The Big Bang Theory”, “episode”: “The Grant Allocation Derivation”, “flag”: false, “airdate”: “2018-11-02T00:00:00Z”, “number”: “S12E07”, “runtime”: 25, “studio”: “CBS”, “rating”: “\u2605 8.8”, “release”: “$day, $time”, “poster”: “https://www.thetvdb.com/banners/_cache/posters/5b8d57d601c5f.jpg”, “fanart”: “https://www.thetvdb.com/banners/_cache/fanart/original/5b8b22b2cecfb.jpg”, “genres”: “Comedy”}]
friendly_name: Sonarr_Upcoming media

Cleared the cache 1000 times. Any tips?

/Ola


#205

@swifty @Ola_Svensson

Do you happen to have this card inside another card like horizontal stack or similar? If so, can you try to place the card on its own and see if that changes anything? There seems to be some issues with 0.81.0 and cards within cards at the moment. If I put my card or even another card like a gauge card inside a horizontal stack they break.