Thanx @krovachek
This is what I managed to hack from your code so far:
aspect_ratio: 1/1
color: grey
color_off: black
color_type: icon
custom_fields:
humidity: |
[[[
return `<ha-icon
icon="mdi:water-percent"
style="width: 48px; height: 48px; color: white;">
</ha-icon><span>${states["sensor.luminance_sensor_humidity"].state} %</span>`
]]]
illumination: |
[[[
return `<ha-icon
icon="mdi:track-light"
style="width: 48px; height: 48px; color: white;">
</ha-icon> <span>${states["sensor.luminance_sensor_luminosity"].state} lx</span>`
]]]
temp: |
[[[
return `<ha-icon
icon="mdi:"
style="width: 48px; height: 48px; color: white;">
</ha-icon> <span>${states['sensor.luminance_sensor_temperature'].state}°C</span></span>`
]]]
icon: []
name: Kitchen
styles:
card:
- background: linear-gradient(rgba(255,255,255,0.1) 50%, rgba(0,0,20,0.3) 50%)
- border-radius: 15px
- border: solid 1.5px rgba(57,128,228)
- padding: 4%
- color: white
- font-size: 48px
- text-shadow: 0px 0px 5px black
- text-transform: capitalize
custom_fields:
humidity:
- justify-self: end
- align-self: middle
- font-size: 56px
- color: white
- font-weight: bold
illumination:
- justify-self: end
- align-self: middle
- font-size: 56px
- color: white
- font-weight: bold
temp:
- justify-self: end
- align-self: middle
- font-size: 100px
- font-weight: bold
- margin-top: 16px
grid:
- grid-template-areas: >-
"i temp""n humidity""move2 move2""light light""nightlight
nightlight""illumination illumination""bath bath"
- grid-template-rows: 1fr 1fr min-content min-content min-content min-content
- grid-template-columns: 1fr 1fr
icon:
- width: 100%
img_cell:
- justify-content: start
- align-items: start
- margin: none
name:
- font-weight: bold
- font-size: 28px
- color: white
- align-self: middle
- justify-self: start
tap_action:
action: fire-dom-event
browser_mod:
command: popup
card:
entities:
- entity: sensor.average_temperature
- entity: sensor.average_humidity
- entity: sensor.average_luminance
show_header_toggle: false
style: |
ha-card {
--ha-card-background: 'rgba(250,0,20,0.8)';
background-image: '/local/images/polygonal.jpg';
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: cover;
background-position: center;
border: solid 1.5px rgba(57,128,228);
border-radius: 15px;
box-shadow: none;
}
type: entities
title: Sensor Data
type: custom:button-card
Grid Card:
- type: grid
cards:
- aspect_ratio: 1/1
color: black
color_off: black
color_type: icon
custom_fields:
humidity: |
[[[
return `<ha-icon
icon="mdi:water-percent"
style="width: 12px; height: 0px; color: white;">
</ha-icon><span>${states["sensor.luminance_sensor_humidity"].state} %</span>`
]]]
illumination: |
[[[
return `<ha-icon
icon="mdi:track-light"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states["sensor.luminance_sensor_luminosity"].state} lux</span>`
]]]
temp: |
[[[
return `<ha-icon
icon="mdi:"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states['sensor.luminance_sensor_temperature'].state}°C</span></span>`
]]]
icon: []
name: Kitchen 1
font-size: 12px
styles:
card:
- background: >-
linear-gradient(rgba(255,255,255,0.1) 45%, rgba(0,0,20,0.3)
50%)
- border-radius: 15px
- padding: 4%
- color: white
- font-size: 12px
- text-shadow: 0px 0px 5px black
- text-transform: capitalize
custom_fields:
humidity:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
illumination:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
temp:
- justify-self: end
- align-self: middle
- font-size: 52px
- font-weight: bold
- margin-top: 16px
grid:
- grid-template-areas: >-
"i temp""n humidity""move2 move2""light light""nightlight
nightlight""illumination illumination""bath bath"
- grid-template-rows: 1fr 1fr min-content min-content min-content min-content
- grid-template-columns: 1fr 1fr
icon:
- width: 100%
img_cell:
- justify-content: start
- align-items: start
- margin: none
name:
- font-weight: bold
- font-size: 18px
- color: white
- align-self: middle
- justify-self: start
tap_action:
action: fire-dom-event
browser_mod:
command: popup
card:
entities:
- entity: sensor.average_temperature
- entity: sensor.average_humidity
- entity: sensor.average_luminance
show_header_toggle: false
style: |
ha-card {
--ha-card-background: 'rgba(250,0,20,0.8)';
background-image: /local/images/polygonal.jpg;
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: cover;
background-position: center;
border: solid 1.5px rgba(57,128,228);
border-radius: 15px;
box-shadow: none;
}
type: entities
title: All Sensor Averages
type: custom:button-card
- aspect_ratio: 1/1
color: black
color_off: black
color_type: icon
custom_fields:
humidity: |
[[[
return `<ha-icon
icon="mdi:water-percent"
style="width: 12px; height: 0px; color: white;">
</ha-icon><span>${states["sensor.luminance_sensor_2_humidity"].state} %</span>`
]]]
illumination: |
[[[
return `<ha-icon
icon="mdi:track-light"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states["sensor.luminance_sensor_2_luminosity"].state} lux</span>`
]]]
temp: |
[[[
return `<ha-icon
icon="mdi:"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states['sensor.luminance_sensor_2_temperature'].state}°C</span></span>`
]]]
icon: []
name: Cuckoo 2
font-size: 12px
styles:
card:
- background: >-
linear-gradient(rgba(255,255,255,0.1) 45%, rgba(0,0,20,0.3)
50%)
- border-radius: 15px
- padding: 4%
- color: white
- font-size: 12px
- text-shadow: 0px 0px 5px black
- text-transform: capitalize
custom_fields:
humidity:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
illumination:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
temp:
- justify-self: end
- align-self: middle
- font-size: 52px
- font-weight: bold
- margin-top: 16px
grid:
- grid-template-areas: >-
"i temp""n humidity""move2 move2""light light""nightlight
nightlight""illumination illumination""bath bath"
- grid-template-rows: 1fr 1fr min-content min-content min-content min-content
- grid-template-columns: 1fr 1fr
icon:
- width: 100%
img_cell:
- justify-content: start
- align-items: start
- margin: none
name:
- font-weight: bold
- font-size: 18px
- color: white
- align-self: middle
- justify-self: start
tap_action:
action: fire-dom-event
browser_mod:
command: popup
card:
entities:
- entity: sensor.average_temperature
- entity: sensor.average_humidity
- entity: sensor.average_luminance
show_header_toggle: false
style: |
ha-card {
--ha-card-background: 'rgba(250,0,20,0.8)';
background-image: /local/images/polygonal.jpg;
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: cover;
background-position: center;
border: solid 1.5px rgba(57,128,228);
border-radius: 15px;
box-shadow: none;
}
type: entities
title: All Sensor Averages
type: custom:button-card
- aspect_ratio: 1/1
color: black
color_off: black
color_type: icon
custom_fields:
humidity: |
[[[
return `<ha-icon
icon="mdi:water-percent"
style="width: 12px; height: 0px; color: white;">
</ha-icon><span>${states["sensor.luminance_sensor_3_humidity"].state} %</span>`
]]]
illumination: |
[[[
return `<ha-icon
icon="mdi:track-light"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states["sensor.luminance_sensor_3_luminosity"].state} lux</span>`
]]]
temp: |
[[[
return `<ha-icon
icon="mdi:"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states['sensor.luminance_sensor_3_temperature'].state}°C</span></span>`
]]]
icon: []
name: Lili Bedrm 3
font-size: 12px
styles:
card:
- background: >-
linear-gradient(rgba(255,255,255,0.1) 45%, rgba(0,0,20,0.3)
50%)
- border-radius: 15px
- padding: 4%
- color: white
- font-size: 12px
- text-shadow: 0px 0px 5px black
- text-transform: capitalize
custom_fields:
humidity:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
illumination:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
temp:
- justify-self: end
- align-self: middle
- font-size: 52px
- font-weight: bold
- margin-top: 16px
grid:
- grid-template-areas: >-
"i temp""n humidity""move2 move2""light light""nightlight
nightlight""illumination illumination""bath bath"
- grid-template-rows: 1fr 1fr min-content min-content min-content min-content
- grid-template-columns: 1fr 1fr
icon:
- width: 100%
img_cell:
- justify-content: start
- align-items: start
- margin: none
name:
- font-weight: bold
- font-size: 18px
- color: white
- align-self: middle
- justify-self: start
tap_action:
action: fire-dom-event
browser_mod:
command: popup
card:
entities:
- entity: sensor.average_temperature
- entity: sensor.average_humidity
- entity: sensor.average_luminance
show_header_toggle: false
style: |
ha-card {
--ha-card-background: 'rgba(250,0,20,0.8)';
background-image: /local/images/polygonal.jpg;
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: cover;
background-position: center;
border: solid 1.5px rgba(57,128,228);
border-radius: 15px;
box-shadow: none;
}
type: entities
title: All Sensor Averages
type: custom:button-card
- aspect_ratio: 1/1
color: black
color_off: black
color_type: icon
custom_fields:
humidity: |
[[[
return `<ha-icon
icon="mdi:water-percent"
style="width: 12px; height: 0px; color: white;">
</ha-icon><span>${states["sensor.luminance_sensor_4_humidity"].state} %</span>`
]]]
illumination: |
[[[
return `<ha-icon
icon="mdi:track-light"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states["sensor.luminance_sensor_4_luminosity"].state} lux</span>`
]]]
temp: |
[[[
return `<ha-icon
icon="mdi:"
style="width: 12px; height: 0px; color: white;">
</ha-icon> <span>${states['sensor.luminance_sensor_4_temperature'].state}°C</span></span>`
]]]
icon: []
name: Study Rm 4
font-size: 12px
styles:
card:
- background: >-
linear-gradient(rgba(255,255,255,0.1) 45%, rgba(0,0,20,0.3)
50%)
- border-radius: 15px
- padding: 4%
- color: white
- font-size: 12px
- text-shadow: 0px 0px 5px black
- text-transform: capitalize
custom_fields:
humidity:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
illumination:
- justify-self: end
- align-self: middle
- font-size: 24px
- color: white
- font-weight: bold
temp:
- justify-self: end
- align-self: middle
- font-size: 52px
- font-weight: bold
- margin-top: 16px
grid:
- grid-template-areas: >-
"i temp""n humidity""move2 move2""light light""nightlight
nightlight""illumination illumination""bath bath"
- grid-template-rows: 1fr 1fr min-content min-content min-content min-content
- grid-template-columns: 1fr 1fr
icon:
- width: 100%
img_cell:
- justify-content: start
- align-items: start
- margin: none
name:
- font-weight: bold
- font-size: 18px
- color: white
- align-self: middle
- justify-self: start
tap_action:
action: fire-dom-event
browser_mod:
command: popup
card:
entities:
- entity: sensor.average_temperature
- entity: sensor.average_humidity
- entity: sensor.average_luminance
show_header_toggle: false
style: |
ha-card {
--ha-card-background: 'rgba(250,0,20,0.8)';
background-image: /local/images/polygonal.jpg;
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: cover;
background-position: center;
border: solid 1.5px rgba(57,128,228);
border-radius: 15px;
box-shadow: none;
}
type: entities
title: All Sensor Averages
type: custom:button-card
columns: 2