Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105660

Is it possible to use and IF in a layout options on grid card

$
0
0

Is is possible to place an if statement into the layout of a "grid(layout-card)

i want it to swap over depending on the state of a bulb etc i can get it to work in templating and see it swap but getting errors when i try to put it in the layout section
grid-template-columns: 1fr 1fr 1fr
{% if is_state(“light.study_light”, “on”) -%}
grid-template-areas: |
“slider button button”
{-% else %-}
grid-template-areas: |
“slider slider button”
{%- endif %}

I’ve tried all various options of brackets but to no avail :frowning:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 105660

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>