I don’t believe there is a way to do what you want with the auto entities card, but you could use a conditional card to display your auto entities card when there are low batteries and a markup card with your message when there is not. You’d probably have to come up with a template sensor to indicate when there are low batteries or use the custom state switch card.
But why are you using the auto entities card with battery state card? That functionality is built right into battery state card!
Also, why go through this effort to hide the card just to display a static message? Why not just let the battery state card (which is great btw) show all your batteries? If you have too many batteries just use the collapse parameter to control how many show and sort by battery level so lowest batteries are always on top.
I will probably end up going the route you are speaking of (the multiple options you gave me)
Can you help me understand what the “else” parameter is for at the following github. I imagine you are correct because you have helped me multiple times here over the past few years.
I just thought that was it’s exact purpose. But I definitely can’t get it to work so I imagine I’m wrong.
I think you just taught me something! I didn’t realize that option had been added in (or maybe it was always there?) I didn’t see an example on the readme, but I think you should be able to use it like this.
else:
type: markdown
content: "No battery devices are at their low battery threshold"
Strongly suggest to ask similar threads in the dedicated auto-entities thread. This way will keep the Community tidy, all solutions will be in one place (not scattered in 100500 places), you will attract more experienced users & share your solutions with more people.
Auto-entities with a “template” filter can either show a set of cards (Ui elements) for filtered entities - or just show another card if a list of entities is empty. Depends on a template which a user defines. Example is here.
do not belong to the “auto-entities” card - they are from a custom:layout-card and are supposed be only used when the “auto-entities” card is placed inside layout-card.
Next, these lines
else:
type: markdown
content: >-
<ha-alert alert-type="info">No battery devices are at their low battery
threshold</ha-alert>
also do not belong to “auto-entities” - and I wonder where they came from?
I suppose they were used in a 1st place to demonstrate a logic “if true - show card_X, else show card_Y”, not as a working code.
Your first comment is right on. I often just grab something I already have, throw it into a test card, and make the changes I am looking at while ignoring the extra. And, you have caught me on this before. Love the consistency!!!
Thank you for making this simple for me!! It’s very possible that extraneous crap came from my first code post because I had it in there from my first attempt at writing this. I have since edited my first topic post to correct this also.