How to hide the media player entities card if no devices are playing

How to hide the media player entities card if no devices are playing

Hi and welcome to a new episode of my daily newsletter?Tips & Tricks on HomeAssistant.

If you get a new e-mail about the availability of this article, please open it, read it, react and comment. It will be appreciated and will give me a much better idea of who is actually reading all this stuff.

Thank you so much!

As we saw here, the Google Cast integration?allows us to control our Google devices for video streaming as well as audio directly via Home Assistant. As soon as the integration has been configured, we only need to add the Google cast entities mediaplayer.xxxx to our dashboard.

It's quite simple.

Considering I've several Google devices at home, the side effect is having all the mediaplayer entities displayed on the GUI even if they are OFF:

No alt text provided for this image

How to optimize the user interface to only display entities when they are playing?

This is the right article for you, let's get going!

Software configuration

  1. Home Assistant. I'm currently running version?2022.12.1.
  2. Google Cast integration?configured in Home Assistant.
  3. A group helper configured to manage all the mediaplayer entities as a whole single entity

No alt text provided for this image

Home Assistant code (yaml) / procedure

Take a look at the following video in which I'm going to configure a super smart entities card:

Thank you for reading and watching. ?? I hope you have enjoyed this article and video too.

I'm available for any feedback so, feel free to contact me or share your thoughts in the comments section below.

Your feedbacks will be very appreciated!

要查看或添加评论,请登录

社区洞察

其他会员也浏览了