Lovelace: Upcoming Media Card

Well in terms of Plex my config is grayed out. I discovered Plex through HA integrations.

#Plex Server
#plex:
#  host: !secret plex_host
#  port: 32400
#  token: !secret plex_token
#  ssl: true
#  verify_ssl: false

As for your card (in config UI):

  • type: js
    url: /community_plugin/upcoming-media-card/upcoming-media-card.js?v=0.1.1

I have both upcoming media card 0.4.0 and plex recently added 0.2.9 installed through the HACS.

The card itself is:

cards:
- entity: sensor.plex_recently_added
title: Recently Added to Plex
type: ‘custom:upcoming-media-card’

Have you added config for the Plex Recently Added component to your configuration.yaml file? Does the sensor plex_recently_added show up in Developer >> States?

The plex config you shared above has nothing to do with this component or card.

Yes sorry, I have it as a sensor:

- platform: plex_recently_added
  token: !secret plex_token
  host: 192.168.1.xx
  port: 32400
  name: Recently Added to Plex

And yes it shows in my states and has values

Yes I now realize it has nothing to do… The one I shared… I got confused. Sorry

No worries and thank you. This is a bug and I’ll get it fixed in the next release.

Actually, it’s not a bug. You’ve just got the card setup wrong.

Your sensor config renames the sensor name: Recently Added to Plex

So your sensor’s name would be sensor.recently_added_to_plex
Meaning your cards config should be:

cards:
- entity: sensor.recently_added_to_plex
  title: Recently Added to Plex
  type: ‘custom:upcoming-media-card’

The error you’re getting means that you have a section in your library named “documentaries” that contains no metadata or no items, but otherwise everything should work fine.

1 Like

That worked!
Thanks.

May I ask how did you get that look?

Upcoming Media Card Config

cards:
- entity: sensor.recently_added_to_plex
  image_style: fanart
  title: Recently Added to Plex
  type: ‘custom:upcoming-media-card’
1 Like

Would it be possible to take the output from this and send a notification with the image? Use case would be for TV episodes that are airing, I’d like a message on TG with the album art and show name/episode name/number. (Fully realize this may not be the right place for this question but I see how the data is parsed into nice JSON so wondered if anybody had thought about using it for a notify service).

So, currently there’s an issue with that. It’s not actually JSON because when I originally made this I didn’t know any better. I do plan to update the card to accept JSON and not just JSON that’s been converted to a string. That way once components are updated you’ll be able to use Jinja templates, etc. to do whatever you like with the data.

Ah, my own rookie mistake then there :slight_smile:

I’ll wait then for the update, should be able to make use of that then.

Has anyone else had problems with the sensor.trakt_upcoming_calendar sensor lately?

Mine was working fine up until recently. Now when I try to add it to Lovelace it barfs and won’t display ANY cards that are configured on the same page.

If I look at the sensor.trakt_upcoming_calendar sensor in the Dev Tools->States it shows:

Adding the sensor to any Lovelace page either shows a blank card or completely wipes out the card and shows nothing.

Example of the Lovelace config:

- badges: []
    cards:
      - entities:
          - entity: sensor.sonarr_series
          - entity: sensor.sonarr_queue
          - entity: sensor.sonarr_upcoming
          - entity: sensor.sonarr_wanted
        show_header_toggle: false
        title: Sonarr
        type: entities
      - entities:
          - entity: sensor.plex
          - entity: sensor.tautulli
        show_header_toggle: false
        title: Watching
        type: glance
      - cards:
          - entity: sensor.sonarr_upcoming_media
            hide_flagged: true
            title: Sonarr - Upcoming TV
            type: 'custom:upcoming-media-card'
          - entity: sensor.recently_added_tv
            title: Plex - Recently Added TV
            type: 'custom:upcoming-media-card'
        type: horizontal-stack
      - type: 'custom:upcoming-media-card'
        entity: sensor.trakt_upcoming_calendar
        Title: Test
    icon: 'mdi:filmstrip'

hi, thanks for this sensor. I’m digging it!

However there is one issue. I have a library in Plex that is for temporary movies for family members to watch. Sometimes the library is empty. I’ve noticed that when it is empty, Home Assistant will log an error like this
2020-03-28 01:49:37 WARNING (SyncWorker_2) [custom_components.plex_recently_added.sensor] No Metadata field for "Family Movies"
This happens every 30 seconds so you end up with thousands of these in your log.

I’m also interested in a use case like @fuzzymistborn described.

@mayker awsome!
Gonna try this.

Any future plans to also support recently added emby movies? (already emby upcoming included)
I see you have that for kodi…

Im using emyb as backend for kodi… so … cant really use kodi then

Other thing i wonder is: my emby server is on my unraid machine, which isnt 24/24 on
Will the media card still show latest movies even if my unraid machine (emby server) is down?

1 Like

OK, I now realise my Integration (Emby Upcoming Media) is prroly named. It does in fact do exactly what you want: Lets you display a list of the latest Movies/TV Shows.
Hope that helps

1 Like

to answer your 2nd question: the component works but will not get updated when your Emby server is down.
If you reboot HA while Emby is down, it will also no load up correctly and will not work until you reboot HA (while Emby is up)
There must be a way to prevent this, I would need to look into it.

@mayker I’m trying to add my component Emby Upccoming Media to the official HACS list.
Do you have any tips on how to do that?
Thanks

Cool thx!

Got it all set up & running ! I truly love this !
Needs some finetuning though :stuck_out_tongue:
I would love if the component would still work after rebooting HA although the emby server is down

Anyway truly lovely card and integration !