Dashboard controls for Emma's new bedroom aircon

This commit is contained in:
2025-03-28 19:46:34 -04:00
parent 6e28eb27ec
commit c3ace0c063
3 changed files with 207 additions and 144 deletions

View File

@ -919,20 +919,35 @@ views:
state_color: true
- type: entities
entities:
- entity: input_number.emma_aircon_threshold
- entity: input_number.emma_bedroom_aircon_run_threshold
name: Run Threshold
secondary_info: >
{% set threshold =
states('input_number.emma_aircon_threshold') | int %} {% set
low = states('sensor.tonights_low_temp') | int %} {{
states('input_number.emma_bedroom_aircon_run_threshold') | int
%} {% set low = states('sensor.tonights_low_temp') | int %} {{
'Threshold Met' if low >= threshold else '' }}
name: Bedtime
show_header_toggle: false
state_color: true
- entity: input_number.emma_bedroom_aircon_mode_threshold
name: Mode Threshold
secondary_info: >
{% set threshold =
states('input_number.emma_bedroom_aircon_mode_threshold') |
int %} {% set low = states('sensor.tonights_low_temp') | int
%} {{ 'Threshold Met' if low >= threshold else '' }}
- entity: input_number.emma_bedroom_auto_cooling_threshold
name: EBR Auto Cooling
secondary_info: >
{% set threshold =
states('input_number.emma_bedroom_auto_cooling_threshold') |
int %} {% set roomtemp =
states('sensor.emma_bedroom_temperature') | int %} {{
'Threshold Met' if roomtemp >= threshold else '' }}
title: Emma Bedroom Aircon
visibility:
- condition: state
entity: input_boolean.emma_bedroom_aircon_installed
state: 'on'
show_header_toggle: false
state_color: true
- type: entities
entities:
- entity: input_number.master_bedroom_fan_threshold

View File

@ -2369,70 +2369,68 @@ views:
service: timer.finish
target:
entity_id: timer.emma_bedroom_motion_timer
- type: entities
state_color: true
entities:
- type: custom:paper-buttons-row
buttons:
- entity: input_boolean.emma_sleeping
name: Sleeping
layout: icon|name_state
state:
case: first
state_icons:
'on': mdi:sleep
'off': mdi:sleep-off
unavailable: mdi:map-marker-question
- entity: input_boolean.white_noise_emma_bedroom
name: White Noise
layout: icon|name_state
state:
case: first
state_icons:
'on': mdi:volume-high
'off': mdi:volume-off
unavailable: mdi:map-marker-question
show_header_toggle: false
- type: custom:state-switch
entity: input_boolean.emma_bedroom_aircon_installed
states:
'on':
type: entities
type: custom:simple-thermostat
entity: climate.emma_bedroom_aircon
header: false
decimals: 0
step_size: 1
layout:
mode:
headings: false
names: true
icons: true
step: row
control:
hvac:
heat: false
preset:
none:
name: Eco Off
eco:
name: Eco On
boost: false
- type: custom:state-switch
entity: input_boolean.emma_bedroom_aircon_installed
states:
'on':
type: glance
show_name: true
show_icon: true
show_state: true
state_color: true
entities:
- type: custom:paper-buttons-row
buttons:
- entity: input_boolean.emma_sleeping
name: Sleeping
layout: icon|name_state
state:
case: first
state_icons:
'on': mdi:sleep
'off': mdi:sleep-off
unavailable: mdi:map-marker-question
- entity: fan.emma_air_conditioner
name: A/C
layout: icon|name_state
state:
case: first
state_icons:
'on': mdi:fan
'off': mdi:fan-off
unavailable: mdi:map-marker-question
- entity: input_boolean.white_noise_emma_bedroom
name: White Noise
layout: icon|name_state
state:
case: first
state_icons:
'on': mdi:volume-high
'off': mdi:volume-off
unavailable: mdi:map-marker-question
- entity: binary_sensor.emma_aircon_compressor
- entity: binary_sensor.emma_bedroom_aircon_compressor
name: Compressor
- entity: script.emma_aircon_shutoff
name: Aircon Shutoff
'off':
type: entities
entities:
- type: custom:paper-buttons-row
buttons:
- entity: input_boolean.emma_sleeping
name: Sleeping
layout: icon|name_state
state:
case: first
state_icons:
'on': mdi:sleep
'off': mdi:sleep-off
unavailable: mdi:map-marker-question
- entity: input_boolean.white_noise_emma_bedroom
name: White Noise
layout: icon|name_state
state:
case: first
state_icons:
'on': mdi:volume-high
'off': mdi:volume-off
unavailable: mdi:map-marker-question
show_header_toggle: false
- entity: binary_sensor.emma_bedroom_aircon_filter_alert
name: Filter
- type: custom:state-switch
entity: input_boolean.emma_bedroom_heater_installed
states:
@ -3471,33 +3469,42 @@ views:
cards:
- type: heading
heading: Emma Bedroom
- type: custom:state-switch
entity: input_boolean.emma_bedroom_aircon_installed
transition: flip
states:
'on':
type: entities
entities:
- entity: input_boolean.emma_bedroom_aircon_installed
name: Emma Bedroom Aircon Installed
- entity: script.emma_aircon_shutoff
name: Shut A/C off safely
show_header_toggle: false
state_color: true
'off':
type: entities
entities:
- entity: input_boolean.emma_bedroom_aircon_installed
name: Emma Bedroom Aircon Installed
secondary_info: Turn on in summer
show_header_toggle: false
state_color: true
- type: entities
entities:
- entity: input_boolean.emma_bedroom_aircon_installed
name: Aircon Installed
- entity: input_boolean.emma_bedroom_climate_protocol
name: Climate Automations
state_color: true
show_header_toggle: false
- type: entities
entities:
- entity: input_boolean.emma_bedroom_heater_installed
name: Heater Installed
show_header_toggle: false
state_color: true
- type: entities
entities:
- entity: switch.emma_bedroom_aircon_display
name: A/C Display
- entity: binary_sensor.emma_bedroom_aircon_filter_alert
name: Filter Status
- entity: input_number.emma_bedroom_daytime_temp
name: Daytime Temp
- entity: input_number.emma_bedroom_night_temp
name: Night Temp
- entity: input_number.emma_bedroom_bedtime_temp
name: Bedtime Temp
- entity: button.emma_bedroom_fan_only
name: A/C Fan Only
- entity: button.emma_bedroom_climate_reset
name: Climate Reset
show_header_toggle: false
state_color: true
visibility:
- condition: state
entity: input_boolean.emma_bedroom_aircon_installed
state: 'on'
visibility:
- condition: user
users:
@ -3519,6 +3526,11 @@ views:
exclude_states:
- unavailable
- unknown
- entity: climate.emma_bedroom_aircon
icon: mdi:air-conditioner
exclude_states:
- unavailable
- unknown
- entity: sensor.master_bedroom_target_temp
icon: mdi:thermostat
name: Master Bedroom Set Temp
@ -3540,10 +3552,6 @@ views:
exclude_states:
- unavailable
- unknown
- entity: fan.emma_air_conditioner
exclude_states:
- unavailable
- unknown
- entity: sensor.master_bedroom_aircon_eco_mode
name: Master Bedroom Eco Mode
exclude_states:
@ -3554,13 +3562,13 @@ views:
exclude_states:
- unavailable
- unknown
- entity: binary_sensor.emma_aircon_fan
name: Emma A/C Fan
- entity: binary_sensor.emma_bedroom_aircon_fan
name: Emma Bedroom A/C Fan
exclude_states:
- unavailable
- unknown
- entity: binary_sensor.emma_aircon_compressor
name: Emma A/C Compressor
- entity: binary_sensor.emma_bedroom_aircon_compressor
name: Emma Bedroom A/C Compressor
exclude_states:
- unavailable
- unknown

View File

@ -2917,6 +2917,8 @@ views:
action: toggle
hold_action:
action: more-info
modules:
- default
- type: custom:bubble-card
card_type: separator
name: Modes
@ -2943,6 +2945,92 @@ views:
card_type: separator
name: Environment
icon: mdi:thermometer
modules:
- default
- type: conditional
conditions:
- condition: state
entity: input_boolean.emma_bedroom_aircon_installed
state: 'on'
card:
type: vertical-stack
cards:
- type: custom:bubble-card
card_type: climate
sub_button:
- select_attribute: hvac_modes
name: HVAC modes menu
state_background: true
- name: Presets menu
select_attribute: preset_modes
state_background: false
show_arrow: true
name: Thermostat
entity: climate.emma_bedroom_aircon
state_color: false
- type: horizontal-stack
cards:
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.emma_bedroom_aircon_compressor
name: Compressor
show_attribute: false
double_tap_action:
action: none
hold_action:
action: none
button_action:
double_tap_action:
action: none
hold_action:
action: none
styles: |-
.bubble-button-background {
opacity: 1 !important;
background-color: ${state === 'on' ? 'var(--accent-color)' : 'var(--background-color-2)'} !important;
}
.bubble-icon {
color: ${state === 'on' ? 'var(--accent-color)' : 'var(--text-color)'} !important;
}
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.emma_bedroom_aircon_filter_alert
name: Filter
show_attribute: false
double_tap_action:
action: none
hold_action:
action: none
button_action:
double_tap_action:
action: none
hold_action:
action: none
styles: |-
.is-unavailable {
opacity: 0.5 !important;
}
.bubble-button-background {
opacity: 1 !important;
background-color: ${state === 'on' ? 'var(--error-color)' : 'var(--background-color-2)'} !important;
transition: background-color 1s !important;
}
.bubble-icon-container {
background: ${state === 'on' ? 'var(--error-color)' : 'var(--card-background-color)'} !important;
}
.bubble-icon-container::after {
opacity: ${state === 'on' ? 0.3 : 0} !important;
transition: all 1s !important;
}
.bubble-icon {
display: flex !important;
opacity: 0.5 !important;
}
.is-on .bubble-icon {
opacity: 1 !important;
}
- type: conditional
conditions:
- condition: state
@ -2962,58 +3050,8 @@ views:
name: Thermostat
entity: climate.emma_bedroom_vtherm
state_color: false
- type: conditional
conditions:
- condition: state
entity: input_boolean.emma_bedroom_aircon_installed
state: 'on'
card:
type: horizontal-stack
cards:
- type: custom:bubble-card
card_type: button
entity: fan.emma_air_conditioner
name: Air Conditioner
show_state: true
tap_action:
action: toggle
double_tap_action:
action: none
hold_action:
action: more-info
button_action:
double_tap_action:
action: none
styles: |
.bubble-icon {
animation: ${state === 'on' ? 'slow-rotate 2s linear infinite' : ''};
}
@keyframes slow-rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
- type: custom:bubble-card
card_type: button
button_type: state
entity: binary_sensor.emma_aircon_compressor
name: Compressor
double_tap_action:
action: none
hold_action:
action: none
button_action:
double_tap_action:
action: none
hold_action:
action: none
styles: |
.bubble-button-background {
opacity: 1 !important;
background-color: ${state === 'on' ? 'var(--accent-color)' : 'var(--background-color-2)'} !important;
}
.bubble-icon {
color: ${state === 'on' ? 'var(--accent-color)' : 'var(--text-color)'} !important;
}
modules:
- default
- type: horizontal-stack
cards:
- type: custom:bubble-card
@ -3030,6 +3068,8 @@ views:
button_action:
double_tap_action:
action: none
modules:
- default
- type: custom:bubble-card
card_type: empty-column
- type: custom:bubble-card