Hey guys,
i need your help. How can i loop through all areas in my HASS setup and create these auto-entities for all those areas? There is a lot of code duplication as you see in the following example for two areas:
# AREA 1
- type: "custom:button-card"
template: "card_title"
label: "HWR"
- type: "custom:auto-entities"
card:
type: "custom:layout-card"
layout_type: "custom:grid-layout"
layout:
grid-template-rows: "min-content"
grid-template-columns: "1fr 1fr 1fr"
mediaquery:
"(max-width: 1400px)":
grid-template-columns: "1fr 1fr"
card_param: "cards"
filter:
include:
- domain: "switch"
area: HWR
options:
type: "custom:button-card"
template: "card_power_outlet"
exclude:
- state: "unavailable"
- hidden_by: "*"
# AREA 2
- type: "custom:button-card"
template: "card_title"
label: "Flur"
- type: "custom:auto-entities"
card:
type: "custom:layout-card"
layout_type: "custom:grid-layout"
layout:
grid-template-rows: "min-content"
grid-template-columns: "1fr 1fr 1fr"
mediaquery:
"(max-width: 1400px)":
grid-template-columns: "1fr 1fr"
card_param: "cards"
filter:
include:
- domain: "switch"
area: Flur
options:
type: "custom:button-card"
template: "card_power_outlet"
exclude:
- state: "unavailable"
- hidden_by: "*"