Reorganization...additional entities for #52

This commit is contained in:
2022-10-12 21:52:08 -04:00
parent 2647ea297d
commit cee987ee1b
2 changed files with 86 additions and 72 deletions

View File

@ -66,6 +66,10 @@ input_boolean:
# Used internally for automations to know if cooling time has passed or not
master_bedroom_cooling_on:
name: Master Bedroom Cooling On
# Activated if the day will be excessively hot. For use with automations for daytime climate control.
hot_day:
name: Hot Day
icon: mdi:heat-wave
input_select:
scheduled_climate_mode_master_bedroom_aircon:
@ -160,6 +164,12 @@ input_number:
step: 1
unit_of_measurement: °F
icon: mdi:thermometer
hot_day_threshold:
name: Hot Day Threshold
min: 70
max: 90
step: 1
unit_of_measurement: °F
automation:
- id: '1655415573165'
@ -172,70 +182,18 @@ automation:
- condition: state
entity_id: input_boolean.nursery_aircon_installed
state: 'on'
- condition: state
entity_id: input_select.scheduled_climate_mode_nursery_aircon
state: 'AC'
action:
- service: fan.turn_on
target:
entity_id: fan.nursery_air_conditioner
- service: script.text_notify
data:
who: "parents"
title: "Nursery Climate Schedule"
message: "The air conditioner in the nursery has been activated."
mode: restart
script:
master_bedroom_climate_scheduling:
sequence:
- service: input_select.select_option
target:
entity_id: input_select.scheduled_climate_mode_master_bedroom_aircon
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.master_bedroom_aircon_run_threshold') %}
{% if states('sensor.tonights_low_temp') >= states('input_number.master_bedroom_aircon_mode_threshold') %}
AC
{% else %}
Fan
{% endif %}
{% else %}
None
{% endif %}
- service: input_select.select_option
target:
entity_id: input_select.scheduled_climate_mode_master_bedroom_fan
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.master_bedroom_fan_threshold') %}
Fan
{% else %}
None
{% endif %}
nursery_climate_scheduling:
sequence:
- service: input_select.select_option
target:
- if:
- condition: state
entity_id: input_select.scheduled_climate_mode_nursery_aircon
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.nursery_aircon_threshold') %}
AC
{% else %}
White Noise
{% endif %}
kallen_fan_scheduling:
sequence:
- service: input_select.select_option
target:
entity_id: input_select.scheduled_climate_mode_kallen_fan
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.kallen_fan_threshold') %}
Fan
{% else %}
White Noise
{% endif %}
state: 'AC'
then:
- service: fan.turn_on
target:
entity_id: fan.nursery_air_conditioner
- service: script.text_notify
data:
who: "parents"
title: "Nursery Climate Schedule"
message: "The air conditioner in the nursery has been activated."
mode: restart

View File

@ -211,7 +211,16 @@ script:
{% else %}
21:40
{% endif %}
- service: script.kallen_fan_scheduling
- service: input_select.select_option
target:
entity_id: input_select.scheduled_climate_mode_kallen_fan
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.kallen_fan_threshold') %}
Fan
{% else %}
White Noise
{% endif %}
house_scheduling_morning:
sequence:
@ -298,6 +307,22 @@ script:
{% else %}
12:00
{% endif %}
- if:
- condition: template
value_template: >
{% if state_attr('sensor.current_forecast','high_temp') >= states('input_number.hot_day_threshold') %}
true
{% else %}
false
{% endif %}
then:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.hot_day
else:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.hot_day
house_scheduling_evening:
sequence:
@ -330,10 +355,9 @@ script:
data_template:
time: >
{% set low = state_attr('sensor.current_forecast','overnight_low') | float %}
{% set high = state_attr('sensor.current_forecast','high_temp') | float %}
{% if high >= 85 and is_state('sensor.school_tomorrow','on') %}
{% if is_state('input_boolean.hot_day','on') and is_state('sensor.school_tomorrow','on') %}
20:00
{% elif high >= 85 and is_state('sensor.school_tomorrow','off') %}
{% elif is_state('input_boolean.hot_day','on') and is_state('sensor.school_tomorrow','off') %}
21:00
{% elif low >= 56 and low <= 60 %}
22:30
@ -352,7 +376,30 @@ script:
{% else %}
00:00
{% endif %}
- service: script.master_bedroom_climate_scheduling
- service: input_select.select_option
target:
entity_id: input_select.scheduled_climate_mode_master_bedroom_aircon
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.master_bedroom_aircon_run_threshold') %}
{% if states('sensor.tonights_low_temp') >= states('input_number.master_bedroom_aircon_mode_threshold') %}
AC
{% else %}
Fan
{% endif %}
{% else %}
None
{% endif %}
- service: input_select.select_option
target:
entity_id: input_select.scheduled_climate_mode_master_bedroom_fan
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.master_bedroom_fan_threshold') %}
Fan
{% else %}
None
{% endif %}
nursery_scheduling:
sequence:
@ -362,11 +409,20 @@ script:
time: >
{% set high = state_attr('sensor.current_forecast','high_temp') | float %}
{% set low = state_attr('sensor.current_forecast','overnight_low') | float %}
{% if high >= 85 %}
{% if is_state('input_boolean.hot_day','on') %}
20:30
{% elif high >= 80 or low >= 60 %}
21:30
{% else %}
22:30
{% endif %}
- service: script.nursery_climate_scheduling
- service: input_select.select_option
target:
entity_id: input_select.scheduled_climate_mode_nursery_aircon
data:
option: >
{% if states('sensor.tonights_low_temp') >= states('input_number.nursery_aircon_threshold') %}
AC
{% else %}
White Noise
{% endif %}