Add hot/cold sensors to color the sub-buttons for each room
This commit is contained in:
@ -79,6 +79,8 @@ decluttering_templates:
|
||||
occupancy_entity: ''
|
||||
temp_entity: ''
|
||||
lux_entity: ''
|
||||
hot_entity: ''
|
||||
cold_entity: ''
|
||||
card:
|
||||
type: custom:bubble-card
|
||||
card_type: button
|
||||
@ -102,20 +104,40 @@ decluttering_templates:
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: '[[navigation_path]]'
|
||||
styles: |-
|
||||
card_mod:
|
||||
style: |-
|
||||
.is-unavailable {
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
.bubble-button-background {
|
||||
opacity: 1 !important;
|
||||
background-color: ${state === 'on' ? 'var(--accent-color)' : 'var(--background-color-2)'} !important;
|
||||
background-color:
|
||||
{% if is_state(config.entity,'on') %}
|
||||
var(--accent-color)
|
||||
{% else %}
|
||||
var(--background-color)
|
||||
{% endif %}
|
||||
!important;
|
||||
transition: background-color 1s !important;
|
||||
}
|
||||
.bubble-icon-container {
|
||||
background:
|
||||
{% if is_state(config.entity,'on') %}
|
||||
var(--accent-color)
|
||||
{% else %}
|
||||
var(--card-background-color)
|
||||
{% endif %}
|
||||
!important;
|
||||
background: ${state === 'on' ? 'var(--accent-color)' : 'var(--card-background-color)'} !important;
|
||||
}
|
||||
.bubble-icon-container::after {
|
||||
opacity: ${state === 'on' ? 0.3 : 0} !important;
|
||||
opacity:
|
||||
{% if is_state(config.entity,'on') %}
|
||||
0.3
|
||||
{% else %}
|
||||
0
|
||||
{% endif %}
|
||||
!important;
|
||||
transition: all 1s !important;
|
||||
}
|
||||
.bubble-icon {
|
||||
@ -125,6 +147,22 @@ decluttering_templates:
|
||||
.is-on .bubble-icon {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.bubble-sub-button {
|
||||
background: transparent
|
||||
}
|
||||
.bubble-sub-button-1 {
|
||||
background-color:
|
||||
{% if is_state('[[hot_entity]]','on') %}
|
||||
var(--error-color)
|
||||
{% elif is_state('[[cold_entity]]','on') %}
|
||||
var(--yellow-color)
|
||||
{% elif is_state(config.entity,'on') %}
|
||||
var(--accent-color)
|
||||
{% else %}
|
||||
var(--background-color-2)
|
||||
{% endif %}
|
||||
!important;
|
||||
}
|
||||
card_layout: large-2-rows
|
||||
sub_button:
|
||||
- entity: '[[temp_entity]]'
|
||||
@ -892,6 +930,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.basement_occupied
|
||||
- temp_entity: sensor.basement_studio_temperature
|
||||
- lux_entity: sensor.basement_studio_illuminance
|
||||
- hot_entity: binary_sensor.basement_studio_hot
|
||||
- cold_entity: binary-sensor.basement_studio_cold
|
||||
- type: custom:decluttering-card
|
||||
template: floors_separator
|
||||
variables:
|
||||
@ -908,6 +948,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.living_room_occupied
|
||||
- temp_entity: sensor.living_room_front_temperature
|
||||
- lux_entity: sensor.living_room_front_illuminance
|
||||
- hot_entity: binary_sensor.living_room_hot
|
||||
- cold_entity: binary_sensor.living_room_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -917,6 +959,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.tina_desk_occupied
|
||||
- temp_entity: sensor.living_room_back_temperature
|
||||
- lux_entity: sensor.living_room_back_illuminance
|
||||
- hot_entity: binary_sensor.living_room_back_hot
|
||||
- cold_entity: binary_sensor.living_room_back_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -926,6 +970,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.stairwell_occupied
|
||||
- temp_entity: sensor.stairwell_bottom_temperature
|
||||
- lux_entity: sensor.stairwell_bottom_illuminance
|
||||
- hot_entity: binary_sensor.stairwell_bottom_hot
|
||||
- cold_entity: binary_sensor.stairwell_bottom_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -935,6 +981,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.downstairs_bathroom_occupied
|
||||
- temp_entity: sensor.downstairs_bathroom_temperature
|
||||
- lux_entity: sensor.downstairs_bathroom_illuminance
|
||||
- hot_entity: binary_sensor.downstairs_bathroom_hot
|
||||
- cold_entity: binary_sensor.downstairs_bathroom_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -944,6 +992,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.mud_room_occupied
|
||||
- temp_entity: sensor.mud_room_temperature
|
||||
- lux_entity: sensor.mud_room_illuminance
|
||||
- hot_entity: binary_sensor.mud_room_hot
|
||||
- cold_entity: binary_sensor.mud_room_cold
|
||||
- type: custom:bubble-card
|
||||
card_type: button
|
||||
button_type: name
|
||||
@ -973,6 +1023,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.upstairs_hallway_occupied
|
||||
- temp_entity: sensor.stairwell_top_temperature
|
||||
- lux_entity: sensor.stairwell_top_illuminance
|
||||
- hot_entity: binary_sensor.stairwell_top_hot
|
||||
- cold_entity: binary_sensor.stairwell_top_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -982,6 +1034,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.upstairs_bathroom_occupied
|
||||
- temp_entity: sensor.upstairs_bathroom_temperature
|
||||
- lux_entity: sensor.upstairs_bathroom_illuminance
|
||||
- hot_entity: binary_sensor.upstairs_bathroom_hot
|
||||
- cold_entity: binary_sensor.upstairs_bathroom_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -991,6 +1045,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.master_bedroom_occupied
|
||||
- temp_entity: sensor.master_bedroom_temperature
|
||||
- lux_entity: sensor.master_bedroom_illuminance
|
||||
- hot_entity: binary_sensor.master_bedroom_hot
|
||||
- cold_entity: binary_sensor.master_bedroom_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -1000,6 +1056,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.kallen_bedroom_occupied
|
||||
- temp_entity: sensor.kallen_bedroom_temperature
|
||||
- lux_entity: sensor.kallen_bedroom_illuminance
|
||||
- hot_entity: binary_sensor.kallen_bedroom_hot
|
||||
- cold_entity: binary_sensor.kallen_bedroom_cold
|
||||
- type: custom:decluttering-card
|
||||
template: main_button_floors
|
||||
variables:
|
||||
@ -1009,6 +1067,8 @@ views:
|
||||
- occupancy_entity: binary_sensor.emma_bedroom_occupied
|
||||
- temp_entity: sensor.emma_bedroom_temperature
|
||||
- lux_entity: sensor.emma_bedroom_illuminance
|
||||
- hot_entity: binary_sensor.emma_bedroom_hot
|
||||
- cold_entity: binary_sensor.emma_bedroom_cold
|
||||
title: Areas
|
||||
- type: grid
|
||||
cards:
|
||||
|
Reference in New Issue
Block a user