Just change the media_player entities with yours !
Don’t forget to also change the notify.mobile_app_<phone name>with your phone that has the home assistant app.
You also asked if it was working only for the guests. No, it works for every plex client you have that can connect to your plex server. So even your friend that are far away that use your plex will give a notification !
Good idea, I’ll work on it when I got time. I’ll tag you when I update this script.
If you were talking to me, I don’t understand what do you mean with
I’m not sure that a media player has a unit of mesurment ?
This is a great little script that works really well. I changed it slightly so it shows me the user name and the Season and Episode number of a show as well.
The only issue I’m running into (but that doesn’t seem to be related to this script) is that when I start something on my Apple TV, the user name shows up as `none’. All other devices show the user name correctly so it’s likely related to the Apple TV integration.
I would appreciate knowing how to extend this to when the show is stopped. Currently I seem to be running into a problem which I believe is because various state attributes become unavailable when the
state of the media player goes to idle.
I tried to sort this with trigger.from_state.attributes.media_season or state_attr(trigger.from_state, media_season) to pick up what was being played but I still couldn’t get it to function, I think because the other variables contained in the script were still expecting to have values but couldn’t take any. Templating is not my strong point!
I think the reason it wasn’t working before is because I was filtering variables that didn’t exist (in the variables section) or I was using a replace filter on device in the variables section (which did exist, but for some reason it didn’t like it). Anyway, this works, I just need to create a wildcard somehow for media_player.plex* so that I don’t have to list out everything.
PS - these if statements all work fine, except for the icon_url one, which always returns false apparently. This means when a show is playing or paused, it can find the show/movie picture. However, if it’s idle/unavailable, then it does not find the picture and no picture is displayed. Can’t figure out why this is.
EDIT - I tried putting a static icon for the prevpicture part of the template but it still didn’t work.