Hi community, I have a View with a background image. In that view I created a Layout-Card that I want to have with a color background for better contrast with the view picture image. I cant get the card to override the image background. The relevant part of the code is:
type: custom:layout-card
layout_type: custom:grid-layout
layout:
grid-template-columns: auto
grid-template-rows: auto
grid-template-areas: |
“header header header header”
“main main2 main3 main4”
cards:
- type: vertical-stack
cards:- type: markdown
content: TRVs Casa 6
view_layout:
grid-area: header
- type: markdown
- type: vertical-stack
cards:- type: custom:multiple-entity-row
show_state: false
toggle: false
entity: climate.trv_entrada
icon: mdi:radiator
name: Entrada
state_color: true
styles:- width: 60px
- height: 45px
- type: custom:multiple-entity-row
- type: vertical-stack
cards:- type: custom:button-card
entity: climate.trv_entrada
variables:
color_background: ‘’
name: Actual
show_state: false
show_icon: false
label: ‘[[[ return entity.attributes.current_temperature]]]’
show_label: true
styles:
card:
- font-size: 14px
- width: 60px
- height: 45px
- background-color: >-
[[[ if (entity.attributes.temperature >
entity.attributes.current_temperature) return
variables.color_background=“orange”; else return
variables.color_background=“lightblue” ]]]
name:
- font-weight: bold
- type: custom:button-card
- type: vertical-stack
cards:- type: custom:button-card
entity: climate.trv_entrada
name: Target
show_state: false
show_icon: false
label: ‘[[[ return entity.attributes.temperature]]]’
show_label: true
styles:
card:
- font-size: 14px
- width: 60px
- height: 45px
name:
- font-weight: bold
- type: custom:button-card
- type: vertical-stack
cards:- type: custom:button-card
entity: climate.trv_entrada
name: Status
show_state: false
show_icon: false
label: ‘[[[ return entity.attributes.preset_mode]]]’
show_label: true
styles:
card:
- font-size: 14px
- width: 80px
- height: 45px
name:
- font-weight: bold
- type: custom:button-card
This is how it looks like today and I want those “flames” from the background image to be a plain background color.