Hello,
I’ve a grid with 5 five cards, all five cards with unique code with only entity_id as common parameter. May I know how to template this scenario?
I’ve looked at lovelace_gen / decluttering card, and I couldn’t figure out how to template a grid using either.
Here’s the sample code of the grid
- square: false
type: grid
cards:
- type: custom:button-card
icon: mdi:snowflake
aspect_ratio: 1/1
tap_action:
action: call-service
service: climate.set_temperature
haptic: medium
service_data:
entity_id: climate.drawing_ac
temperature: 24
hvac_mode: cool
styles:
card:
- background-color: var(--blue)
icon:
- color: var(--black)
- animation: |
[[[
var ac_state = states['climate.drawing_ac'].state;
return (ac_state == "off") ? "None" : "rotating 1s linear infinite";
]]]
And a bunch of 4 other cards of the thermostat in the same grid.
What I’d like to do is something like this:
- !include hvac_grid_template.yaml
- entity: entity_id
Rather than:
- square: false
type: grid
cards:
- !include
- card1.yaml
- hvac-entity-id
- !include
- card2.yaml
- hvac-entity-id
Thanks.