and the tile you want it the tile of the grid?
that can be done easily, although with a bit of an extra effort (using card-mod 3.4.5) as grids dont have a ha-card element, you need to use the integrated custom:mod-card for that.
Search for that in the card-mod thread and see an example here and then find the right element in the Inspector for the title to target in your mod
What I want to accomplish is that the auto-entities-grid card has a header above it (type: heading / variant: title), but I only want it to be visible when the auto-entities actually have something to show.
Using the code inspector, the title I am aiming for is in hui-heading-card.
I found a workaround (cfr code below). It works, but I donāt like the fact that I am actually duplicating my filters.
What do you mean with ādoes nothingā? By duplicating the auto-entities filter, both the heading-title as the underlying tiles appear/disappear when needs.
If I take the heading outside auto-entities, I could indeed work with visibility-conditions. But the condition would need to be āwhen auto-entities do not have any tile to show, donāt show the headerā. And I donāt know how to do that (besides duplicating my auto-entities filter).
as you can see in my first screenshot, there are no populated cards with that code, except for the heading
I have quite a few climate entities, and in a correct config they would have showed up
the condition would have to be when any climate entity is active⦠Or so I understood your configuration
1 simple helper (binary_sensor) would suffice
Strange. That behaviour is different here. If there is one entity visible (cfr screenshot), I see both the header and the tile.
When no entities are shown, the header also dissappears.
type: custom:auto-entities
show_empty: true
card:
type: heading
heading: Verwarming actief
# variant: title #dont use this as it is not correct option, should be `heading_style`
card_param: card
filter:
include:
- options: {}
domain: climate
it isnt, it is exactly the same⦠this code is what you have yourself and it will only show the header, no matter the state of any climate entity,
that is why you can (should) take this out of an auto-entities config and use it stand alone (combined with the visibility option on the vertical-stack)
Thanks for helping me out. And that YAML looks much better.
Some things I noticed:
hvac_action: āonā should be hvac_action: āheatingā apparantly (I forgot this myself). And you have many types of hvac actions (cooling,ā¦). So that why probably I initially chose to exclude some states;
I saw a āfilter: &filterā in your YAML, and a reference to that further down the YAML. And that is very neat. It avoids duplication. But if I apply it, save it and reopen the YAML, it seems that the filter is automatically duplicated by Home Assistant.
Additionally, the general clean-up is counteracted by HA after saving it. E.g. the exclude section has again changed to: