Intelligent Media Entity (or dynamic entity visibility)

This might take a bit of effort to create.

I have an NVIDIA Shield that I run Kodi on. Inside Kodi, I run the Emby for Kodi plugin. Because of this, I have 3 entities for this. It would be nice if this could somehow be rolled into 1 card, that intelligently promotes who is playing to the “front” so to speak.

I guess the simplest way to think of it is stacking the cards on each other. If Emby is playing, then I wouldn’t really see the Kodi/Shield cards. Emby->Kodi->Shield. If something is playing on Kodi (but not sourced from Emby) then I’d see Kodi. Likewise if the Shield is playing something that isn’t from Kodi, I don’t see the others.

Maybe it could be done with some sort of dynamic visibility and automation state and not require a complicated new entity.

  group_visibility:
    sequence:
      - service: group.set_visibility
        data_template:
          entity_id: "{{ entity_id }}"
          visible: "{{ is_state(cond, visible_state) }}"

Ok, I’ll give that a shot. Is this a case of RTFM that I missed?

Thanks, I’ll give that a shot! Is this a case of RTFM that I missed?

I think a roll up of functionality would still be neat, but I can probably get 90% of the way there with what you provided

https://home-assistant.io/topics/group_visibility/

1 Like

I am playing with this now. One thing I ran into is that I had to put each media_player into it’s own group because you can’t set the visibility of the media_player entity directly.

I wonder if maybe the group.set_visibility logic should be push to the entities and have an entity.set_visibility?

2 Likes