it all depends on your specific situation. If you only have Hue light groups, you could exclude those based on an attribute specific to the Hue integration
filter:
exclude:
- attributes:
is_hue_group: true # or hue_type: *
in my case, with several other light integrations, the simplest way was to create a few groups and included those in the auto-entities:
Hey all, been trying to filter out a media player entity only if another entity is playing. For context, Iām trying to hide my SHIELDās Android TV media player if the integrated Chromecast media player is playing. Any ideas? Iāve thought about using a template filter to show either one or the other, but that gets processed before the exclude filter runs so Iāll probably have to rework my entire config for the card. Iāve added the config of the card below.
I will copy below my post from the thread just so everything is in one place.
Can anybody help me out, please?
Essentially I am trying to get
Hello everyone,
I am trying to display a slider and next to it the data from a sensor. Basically the slider of the thermostat with setpoint and then the actual room temperature from a Xiaomi Mijia Thermometer in the room.
Since I have multiple rooms and systematic nomenclature, I would like to use auto-entities.
As you can see, the sensor temperatures are listed next to each other and only break when no more room is available. I would like to have them underneath each other, so each row only contains one slider and one glance state entry.
As I already told you - you must create a vertical stack of horizontal stacks, where each stack is āslider + glanceā.
Start with displaying the same entity on the slider & on the glance (finally you will need one entity on the slider, another on the glance).
Then you will see (already visible on your wrong draft) that your final card has 50% of width for sliders, 50% of width for glance. Then you will make the right part more narrow - either by card-mod or by using layout-card (instead of horizontal stack).
Then your card is almost ready - but you need to specify a different entity on the glance part. So build your code for ātemplateā option.
This this the Way.
I will need to play with that. I have not used template yet with auto-entities filters. Not sure how to make a template that will only pass to a specific card.
I cannot access my server right now either (at the office) but will it work to automatically create new stacks with their own sub-filter?
Because what would be needed is
Stack 1 (row filter: .living_room)
slider (filter: .eq_3_temperature)
glance (filter: .xiaomi_temperature)
Stack 2 (row filter: .dining_room)
slider (cell filter: .eq_3_temperature)
glance (cell filter: .xiaomi_temperature)
Stack 3 (row filter: .office)
slider (cell filter: .eq_3_temperature)
glance (cell filter: .xiaomi_temperature)
Stack 4 (row filter: .kitchen)
slider (cell filter: .eq_3_temperature)
glance (cell filter: .xiaomi_temperature)
So I would need a filter per row plus a filter per cell.
And all of this would be significantly more code than it was supposed to be.
Auto-entities will not automatically create new horizontal stack rows within the vertical stack. But that is what would be needed if I add horizontal stacks.
With this approach I would need much more code than I hoped. It would be easier to make it all manual then.
Or does your approach create the rows automatically somehow?
There is ONE filter - on the only auto-entities card.
First create a filter w/o using a ātemplateā option.
After finalizing creating a card - rebuild it to using ātemplateā.
Check examples with ātemplateā here.
No.
As I said - first use one filter to get entities of ONE kind (some āinput_numberā, for instance).
Create a card, finalize it.
Then rebuild your filter to template - which creates TWO kinds of entities.
Do a simpler task: create a list of rows in Entities card, where state (& slider) is displayed for some āinput_numberā, and for ānameā display a name of some āsensorā (your template filter must generate a sensorās & input_numberās entity_ids).
Pfuh, that sounds quite difficult. I will try to work my way through it. It probably sounds easy peasy to you. Maybe I just need to read it a few more times to see its simplicity
While looking for template examples in this thread I found this post using multiple-entities-row.
I will try and see if maybe that custom card already support what I am trying to achieve without having to do layout work afterwards (which sometimes does not work properly across different devices).
I think this is above me. I tried adapting your linked example to some simple sensors that my HA has, but I failed miserably.
I am surprised at how difficult this is proving to be.
Create any complex card w/o auto-entiies.
Let it be a stack of Entities cards + Glance cards + some graphs, whatever.
Do it in storage mode.
Then open a generated dashboard file - you will find a json code.
Here is a draft of your template ))))
Oh, I was not aware. I will need to give that a try. Is it possible to switch back and forth between storage and yaml mode without creating issues on dashboards?
I just looked at the Multiple Dashboards - Home Assistant documentation and it looks like storage is the default anyway. Never considered moving my dashboards to yaml. But will do now. Much easier to backup than manually.
Thank you, I will check it out this weekend and hopefully learn somthing from the syntax that will help me here.
I myself prefer a āall config is in yamlā way & dislike the current trend āmove config to UIā.
Easier to backup, to temporarily include/exclude a code, move a code to another HA instance etc.