Note that now after you corrected the formatting, some not-code text is shown as a code.
So, what I see is 4 (could be more) cards of same structure but with different source entities, right?
And you want to NOT reappear same code several times, yes?
If you need to show same card (means - same structure) in different views or for entities which do not follow some naming pattern - consider decluttering-card: create a decluttering card template and then use it for different entities.
If you need to show these same cards in one view only and entities follow some naming pattern - this can be done by auto-entities (and mentioned decluttering template may be used as well).
P.S. The AI friend suggested you a wrong code for auto-entities. We may consider this auto-entities card if it is really needed.
I see it as the same basic problem, auto generating a dashboard based on the names of sensor entities. It just so happens mine have a different naming pattern than OP, but the basic question is the same.
If you need to layout several SAME cards with different entities - then auto-entities could be a good option.
Basically, all auto-entities related questions are asked in the main dedicated thread:
Bu in this thread it could be not only auto-entities related question, let’s wait what OP says.
I don’t particularly care or have a prefrence to any given card, i’m just after a working solution
The pattern of these sensors is:
sensor.atc_temperature
sensor.atchumidity
sensor.atc*_battery
stuff those values in a compact card as seen in the picture, 2 colums and then a new row with another 2 colums and repeat that until there are no more sensors.
I’m looking for someone thats better at this stuff than me that can help out and to learn more at the same time.
I’ll take a look at that declutter carad, maybe it makes it feasable to automate it in a sane way.
Thanks.
Then i mixed in auto-entities and it “kinda” works, problem is that the variables don’t seem to “expand” so it looks ok but all the values are unknown. I’ve been trying permutations of {{ and [[ but can’t seem to find what’s wrong.