HA Media Player, can I get what is being watched?

short story long: I have a 5 years old kid and in his room, I have an Apple Tv and a Fire Tv. Both devices are registered in my HA instance and I have parental controls enabled on both but I must say is not as good as I would like. Bottom line: I would like to add some extra “security” layers by creating a Flow using NodeRed that will stop the FireTv/AppleTV from playing certain YoutubeKid channels or videos.

I use the built-in Media Player card to manage those and I know when they are on and barely it shows what is being played as shown in the below picture but I never get the real name or any other kind of information regarding of what is being watched.

Is this possible? Would you recommend me a different integration/add-on rather than the default Media Player?

This card is available in HACS

Yea, that one shows up what is being watched however I need to have HA opened and in that view :frowning: the idea is to capture that somehow and trhough NodeRED sent me a notification using Telegram, that way I will know what the kid is watching … without the need to have HA opened constantly

You can get info out of ha and into node red.

But HA can also send messages via telegram.

Either way you are restricted to what info Ha has.

The mini media player is great, but you are still governed by what info HA has in the media player attributes.

Open up the HA developer tools and look at what info the entities have.
Sometimes the info is there but not shown in standard cards.

1 Like

Where exactly do I need to go? Developer Tools > Sates and search for the entity in there? If so …

That’s it, but you’re missing the media sources. Go to Settings - Devices and Services - Integrations - select your Android TV device and click on “Configure”. Check the checkbox for “Retrieve the running apps as the list of sources” and then click on Submit. Then check again in Developers Tools and it should show all of the available sources (source_list) as well as the current source (source).

FWIW, you may not be able to get exactly what you want.

For example, I’m using the same integration and, when the TV is playing Netflix, its associated media_player displays a source attribute containing “Netflix”. It doesn’t display a title of the content playing on Netflix, just that the source of the content is Netflix.


EDIT

Regardless of what I select to play on YouTube, the source attribute simply displays “YouTube (FireTV)”.

It is ‘off’ - see the state. When it is playing it may show other attributes.

you’re right it only displays the source but not what is being displayed :frowning:

Okay guys, after reading a lot and trying some stuff I ended up using Mushroom and I did it as follows:

              - type: custom:mushroom-media-player-card
                entity: media_player.master_bedroom
                use_media_artwork: true
                use_media_info: true
                media_controls:
                  - play_pause_stop
                  - previous
                  - next
                collapsible_controls: true
                volume_controls:
                  - volume_set
                show_volume_level: true
                fill_container: false
                tap_action:
                  action: toggle
                card_mod:
                  style: |
                    ha-card {
                      {% if not is_state(config.entity, 'off') %}
                        background-image: url( '{{ state_attr( config.entity, "entity_picture" ) }}' );
                        background-position: center;
                        background-repeat: no-repeat;
                        background-size: cover;
                        position: relative;
                        background-blend-mode: overlay;
                        background-color: rgba(var(--rgb-card-background-color),0.5);
                      {% endif %}  
                    }

however, I am still unable to get exactly what is being played on the device but at least that background image gives me a hint.

Thanks all for your time

PD: not sure which answer mark as the solution since all of you help

Probably none given that the original request for “creating a Flow using NodeRed that will stop the FireTv/AppleTV from playing certain YoutubeKid channels or videos” remains unfulfilled because the integration doesn’t identify the content (i.e. “what is being watched”).

1 Like