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