Compare commits
4 Commits
be0edfc447
...
state_colo
| Author | SHA1 | Date | |
|---|---|---|---|
|
772860344c
|
|||
|
7a490f2b4d
|
|||
|
a3fe6e269f
|
|||
|
edb1728c02
|
@@ -6621,3 +6621,75 @@
|
||||
entity_id: climate.basement_studio_vtherm
|
||||
data: {}
|
||||
mode: restart
|
||||
- id: '1775731411839'
|
||||
alias: Emma Bedroom Mode Switch
|
||||
description: For switching modes when the temperature goes from one extreme at night
|
||||
to the other during the day
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: input_datetime.emma_bedroom_mode_switch
|
||||
id: switch-time
|
||||
alias: Switch Time
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_bedroom_mode_switch
|
||||
state:
|
||||
- 'on'
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.emma_bedroom_mode_switch
|
||||
state:
|
||||
- To Aircon
|
||||
alias: To Aircon
|
||||
sequence:
|
||||
- action: input_boolean.turn_on
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: input_boolean.emma_bedroom_aircon_installed
|
||||
data: {}
|
||||
alias: Enable aircon, disable heater
|
||||
- action: input_number.set_value
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: input_number.emma_bedroom_bedtime_temp
|
||||
data:
|
||||
value: 68
|
||||
alias: Set bedtime temp
|
||||
- action: input_select.select_option
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: input_select.scheduled_climate_mode_emma_bedroom
|
||||
data:
|
||||
option: AC
|
||||
alias: Set scheduled mode to AC
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: switch.emma_bedroom_climate_watchdog
|
||||
data: {}
|
||||
alias: Turn on climate watchdog
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 5
|
||||
milliseconds: 0
|
||||
- action: button.press
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: button.emma_bedroom_bedtime_mode
|
||||
data: {}
|
||||
alias: Activate bedtime mode to apply new settings
|
||||
- delay:
|
||||
hours: 0
|
||||
minutes: 1
|
||||
seconds: 0
|
||||
milliseconds: 0
|
||||
- action: input_boolean.turn_off
|
||||
metadata: {}
|
||||
target:
|
||||
entity_id: input_boolean.white_noise_emma_bedroom
|
||||
data: {}
|
||||
alias: Turn off white noise
|
||||
mode: restart
|
||||
|
||||
@@ -6,18 +6,20 @@
|
||||
state = hass?.states[this.config?.entity]?.state || '';
|
||||
}
|
||||
|
||||
let bg_color = 'var(--bubble-main-background-color)';
|
||||
let off_color = this.config?.state_color_button?.off_color
|
||||
? `var(--${this.config.state_color_button.off_color})`
|
||||
: 'var(--bubble-main-background-color)';
|
||||
|
||||
// Use the configured color or default to accent color
|
||||
let on_color = this.config?.state_color_button?.color
|
||||
? `var(--${this.config.state_color_button.color})`
|
||||
let on_color = this.config?.state_color_button?.on_color
|
||||
? `var(--${this.config.state_color_button.on_color})`
|
||||
: 'var(--bubble-accent-color)';
|
||||
|
||||
// Main button background
|
||||
const mainButton = card?.querySelector('.bubble-button-background');
|
||||
if (mainButton) {
|
||||
mainButton.style.opacity = '1';
|
||||
mainButton.style.backgroundColor = state === 'on' ? on_color : bg_color;
|
||||
mainButton.style.backgroundColor = state === 'on' ? on_color : off_color;
|
||||
mainButton.style.transition = 'background-color 1s';
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
- name: color
|
||||
label: Color (CSS Variable)
|
||||
- name: on_color
|
||||
label: On Color (CSS Variable)
|
||||
selector:
|
||||
text: {}
|
||||
required: false
|
||||
- name: off_color
|
||||
label: Off Color (CSS Variable)
|
||||
selector:
|
||||
text: {}
|
||||
required: false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
state_color_button:
|
||||
name: State Color Button
|
||||
version: 1.2.0
|
||||
version: 2.0.0
|
||||
creator: Tony Stork
|
||||
supported:
|
||||
- button
|
||||
@@ -14,7 +14,7 @@ state_color_button:
|
||||
alt_entity: sensor.your_face
|
||||
</pre></code-block>
|
||||
code: |-
|
||||
${(() => {
|
||||
`${(() => {
|
||||
let state;
|
||||
if (this.config?.state_color_button?.alt_entity) {
|
||||
state = hass?.states[this.config?.state_color_button?.alt_entity]?.state || '';
|
||||
@@ -22,18 +22,20 @@ state_color_button:
|
||||
state = hass?.states[this.config?.entity]?.state || '';
|
||||
}
|
||||
|
||||
let bg_color = 'var(--bubble-main-background-color)';
|
||||
let off_color = this.config?.state_color_button?.off_color
|
||||
? `var(--${this.config.state_color_button.off_color})`
|
||||
: 'var(--bubble-main-background-color)';
|
||||
|
||||
// Use the configured color or default to accent color
|
||||
let on_color = this.config?.state_color_button?.color
|
||||
? `var(--${this.config.state_color_button.color})`
|
||||
let on_color = this.config?.state_color_button?.on_color
|
||||
? `var(--${this.config.state_color_button.on_color})`
|
||||
: 'var(--bubble-accent-color)';
|
||||
|
||||
// Main button background
|
||||
const mainButton = card?.querySelector('.bubble-button-background');
|
||||
if (mainButton) {
|
||||
mainButton.style.opacity = '1';
|
||||
mainButton.style.backgroundColor = state === 'on' ? on_color : bg_color;
|
||||
mainButton.style.backgroundColor = state === 'on' ? on_color : off_color;
|
||||
mainButton.style.transition = 'background-color 1s';
|
||||
}
|
||||
|
||||
@@ -54,10 +56,15 @@ state_color_button:
|
||||
|
||||
// No CSS string needed
|
||||
return '';
|
||||
})()}
|
||||
})()}`
|
||||
editor:
|
||||
- name: color
|
||||
label: Color (CSS Variable)
|
||||
- name: on_color
|
||||
label: On Color (CSS Variable)
|
||||
selector:
|
||||
text: {}
|
||||
required: false
|
||||
- name: off_color
|
||||
label: Off Color (CSS Variable)
|
||||
selector:
|
||||
text: {}
|
||||
required: false
|
||||
|
||||
@@ -243,6 +243,10 @@ input_boolean:
|
||||
name: Emma Bedroom Heater Installed
|
||||
icon: mdi:heating-coil
|
||||
|
||||
emma_bedroom_mode_switch:
|
||||
name: Emma Bedroom Mode Switch
|
||||
icon: mdi:swap-horizontal
|
||||
|
||||
input_select:
|
||||
scheduled_climate_mode_master_bedroom_aircon:
|
||||
name: Scheduled Climate Mode - Master Bedroom Aircon
|
||||
@@ -273,6 +277,13 @@ input_select:
|
||||
- White Noise
|
||||
- N/A
|
||||
icon: mdi:home-thermometer
|
||||
emma_bedroom_mode_switch:
|
||||
name: Emma Bedroom Mode Switch
|
||||
options:
|
||||
- To Aircon
|
||||
- To Heater
|
||||
initial: To Aircon
|
||||
icon: mdi:swap-horizontal
|
||||
|
||||
input_number:
|
||||
master_bedroom_daytime_temp:
|
||||
@@ -401,6 +412,13 @@ input_number:
|
||||
step: 1
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:thermometer
|
||||
emma_bedroom_auto_mode_threshold:
|
||||
name: Emma Bedroom Auto Mode Threshold
|
||||
min: 40
|
||||
max: 80
|
||||
step: 1
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:thermometer
|
||||
kallen_fan_threshold:
|
||||
name: Kallen Fan Threshold
|
||||
min: 40
|
||||
@@ -597,6 +615,27 @@ input_number:
|
||||
step: 1
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:thermometer-chevron-down
|
||||
window_weather_minimum:
|
||||
name: Window Weather Minimum
|
||||
min: 40
|
||||
max: 80
|
||||
step: 1
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:window-closed
|
||||
window_weather_maximum:
|
||||
name: Window Weather Maximum
|
||||
min: 40
|
||||
max: 80
|
||||
step: 1
|
||||
unit_of_measurement: °F
|
||||
icon: mdi:window-closed
|
||||
|
||||
input_datetime:
|
||||
emma_bedroom_mode_switch:
|
||||
name: Emma Bedroom Mode Switch
|
||||
has_date: false
|
||||
has_time: true
|
||||
icon: mdi:swap-horizontal
|
||||
|
||||
climate:
|
||||
- platform: generic_thermostat
|
||||
|
||||
@@ -742,6 +742,25 @@ template:
|
||||
state: "{{ state_attr('binary_sensor.severe_thunderstorm_warning','tornado_possible') }}"
|
||||
device_class: safety
|
||||
icon: "{{ 'mdi:weather-tornado' if this.state == 'on' else 'mdi:close' }}"
|
||||
- name: Window Weather
|
||||
unique_id: 9b119394-cb05-44bb-9c6e-e8d5c882a470
|
||||
state: >
|
||||
{% set minimum_temp = states('input_number.window_weather_minimum') | int %}
|
||||
{% set maximum_temp = states('input_number.window_weather_maximum') | int %}
|
||||
{% set ns = namespace(raining=false) %}
|
||||
{% for entity, dry_state in [
|
||||
('binary_sensor.home_tempest_cloud_binary_sensors_is_raining', 'off'),
|
||||
('sensor.home_tempest_cloud_sensors_precipitation_intensity', 'no_rain'),
|
||||
('sensor.home_tempest_precipitation_type', 'none')
|
||||
] %}
|
||||
{% if states(entity) not in ['unavailable', 'unknown'] %}
|
||||
{% if not is_state(entity, dry_state) %}
|
||||
{% set ns.raining = true %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% set temp = state_attr('weather.iron_nerd_weather_station','temperature') %}
|
||||
{{ (not ns.raining) and (minimum_temp <= temp <= maximum_temp) }}
|
||||
- sensor:
|
||||
# - name: Total Rain Sensors
|
||||
# unique_id: b7c2e709-8f5c-4263-aa1d-fa8280afcddb
|
||||
|
||||
@@ -51,79 +51,87 @@ input_datetime:
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
alarm_control_panel:
|
||||
- platform: template
|
||||
panels:
|
||||
nerdhome_alarm_panel:
|
||||
name: Nerd Home Alarm Panel
|
||||
unique_id: d7eb8335-4998-49bf-957e-231aeed35179
|
||||
value_template: "{{ states('alarm_control_panel.stratton_ave_alarm') }}"
|
||||
code_arm_required: false
|
||||
arm_away:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.security_faults
|
||||
state: 'off'
|
||||
then:
|
||||
- service: alarm_control_panel.alarm_arm_away
|
||||
target:
|
||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
else:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
arm_home:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.security_faults
|
||||
state: 'off'
|
||||
then:
|
||||
- service: alarm_control_panel.alarm_arm_home
|
||||
target:
|
||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
||||
then:
|
||||
- service: script.status_annc
|
||||
data:
|
||||
who: living_room
|
||||
call_security_armed: 1
|
||||
else:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
disarm:
|
||||
- service: alarm_control_panel.alarm_disarm
|
||||
target:
|
||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||
template:
|
||||
- alarm_control_panel:
|
||||
- name: Nerd Home Alarm Panel
|
||||
unique_id: d7eb8335-4998-49bf-957e-231aeed35179
|
||||
code_arm_required: false
|
||||
arm_away:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.security_faults
|
||||
state: 'off'
|
||||
match: all
|
||||
then:
|
||||
- target:
|
||||
entity_id:
|
||||
- alarm_control_panel.stratton_ave_alarm
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
action: alarm_control_panel.alarm_arm_away
|
||||
- target:
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
action: input_boolean.turn_off
|
||||
else:
|
||||
- target:
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
action: input_boolean.turn_on
|
||||
arm_home:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.security_faults
|
||||
state: 'off'
|
||||
match: all
|
||||
then:
|
||||
- target:
|
||||
entity_id:
|
||||
- alarm_control_panel.stratton_ave_alarm
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
||||
action: alarm_control_panel.alarm_arm_home
|
||||
- target:
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
action: input_boolean.turn_off
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
||||
then:
|
||||
- service: script.status_annc
|
||||
data:
|
||||
- data:
|
||||
who: living_room
|
||||
call_security_not_armed: 1
|
||||
|
||||
template:
|
||||
call_security_armed: 1
|
||||
action: script.status_annc
|
||||
else:
|
||||
- target:
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
action: input_boolean.turn_on
|
||||
disarm:
|
||||
- target:
|
||||
entity_id:
|
||||
- alarm_control_panel.stratton_ave_alarm
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
||||
action: alarm_control_panel.alarm_disarm
|
||||
- target:
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
action: input_boolean.turn_off
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
||||
then:
|
||||
- data:
|
||||
who: living_room
|
||||
call_security_not_armed: 1
|
||||
action: script.status_annc
|
||||
code_format: number
|
||||
default_entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||
state: "{{ states('alarm_control_panel.stratton_ave_alarm') }}"
|
||||
- binary_sensor:
|
||||
- name: Windows
|
||||
unique_id: 9ff34cd4-c450-45d2-934a-b4a9fd8b93b2
|
||||
|
||||
Reference in New Issue
Block a user