Necessary changes to support master bedroom air conditioner
This commit is contained in:
@ -468,7 +468,7 @@
|
|||||||
mode: restart
|
mode: restart
|
||||||
- id: '1652215901673'
|
- id: '1652215901673'
|
||||||
alias: Master Bedroom Nighttime Protocol
|
alias: Master Bedroom Nighttime Protocol
|
||||||
description: ''
|
description: Management of the fan and air conditioner in the master bedroom
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: input_datetime.master_bedroom_cooling
|
at: input_datetime.master_bedroom_cooling
|
||||||
@ -476,7 +476,13 @@
|
|||||||
- platform: time
|
- platform: time
|
||||||
at: input_datetime.master_bedroom_wakeup
|
at: input_datetime.master_bedroom_wakeup
|
||||||
id: master-bedroom-wakeup
|
id: master-bedroom-wakeup
|
||||||
condition: []
|
- platform: time
|
||||||
|
at: input_datetime.master_bedroom_fan
|
||||||
|
id: master-bedroom-fan
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.vacation_mode
|
||||||
|
state: 'off'
|
||||||
action:
|
action:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -487,41 +493,68 @@
|
|||||||
- condition: numeric_state
|
- condition: numeric_state
|
||||||
entity_id: sensor.current_forecast
|
entity_id: sensor.current_forecast
|
||||||
attribute: overnight_low
|
attribute: overnight_low
|
||||||
above: '40'
|
above: '50'
|
||||||
then:
|
then:
|
||||||
- service: fan.turn_on
|
- service: switch.turn_on
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: fan.master_bedroom_fan_socket_1
|
entity_id: switch.master_bedroom_aircon
|
||||||
- parallel:
|
- parallel:
|
||||||
- service: script.text_notify_tony
|
- service: script.text_notify_tony
|
||||||
data:
|
data:
|
||||||
title: Fan Schedule Activated
|
title: AC Schedule Activated
|
||||||
message: Master bedroom fan has been activated, as scheduled based on
|
message: '"Master bedroom AC has been activated, as scheduled based
|
||||||
tonight's forecast low
|
on tonight''s forecast low"'
|
||||||
- service: script.text_notify_tina
|
- service: script.text_notify_tina
|
||||||
data:
|
data:
|
||||||
title: Fan Schedule Activated
|
title: AC Schedule Activated
|
||||||
message: Master bedroom fan has been activated, as scheduled based on
|
message: '"Master bedroom AC has been activated, as scheduled based
|
||||||
tonight's forecast low
|
on tonight''s forecast low"'
|
||||||
else:
|
else:
|
||||||
- parallel:
|
- parallel:
|
||||||
- service: script.text_notify_tony
|
- service: script.text_notify_tony
|
||||||
data:
|
data:
|
||||||
title: Fan Schedule Skipped
|
title: AC Schedule Skipped
|
||||||
message: Too cold outside, fan not activated
|
message: Too cold outside, AC not activated
|
||||||
- service: script.text_notify_tina
|
- service: script.text_notify_tina
|
||||||
data:
|
data:
|
||||||
title: Fan Schedule Skipped
|
title: AC Schedule Skipped
|
||||||
message: Too cold outside, fan not activated
|
message: Too cold outside, AC not activated
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: master-bedroom-fan
|
||||||
|
sequence:
|
||||||
|
- if:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: sensor.current_forecast
|
||||||
|
attribute: overnight_low
|
||||||
|
above: '40'
|
||||||
|
then:
|
||||||
|
- service: switch.turn_on
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: switch.master_bedroom_fan_socket_1
|
||||||
|
- parallel:
|
||||||
|
- service: script.text_notify_tony
|
||||||
|
data:
|
||||||
|
title: Fan Schedule Activated
|
||||||
|
message: '"Master bedroom fan has been activated, as scheduled based
|
||||||
|
on tonight''s forecast low"'
|
||||||
|
- service: script.text_notify_tina
|
||||||
|
data:
|
||||||
|
title: Fan Schedule Activated
|
||||||
|
message: '"Master bedroom fan has been activated, as scheduled based
|
||||||
|
on tonight''s forecast low"'
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: master-bedroom-wakeup
|
id: master-bedroom-wakeup
|
||||||
sequence:
|
sequence:
|
||||||
- service: fan.turn_off
|
- service: switch.turn_off
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: fan.master_bedroom_fan_socket_1
|
entity_id:
|
||||||
|
- switch.master_bedroom_fan_socket_1
|
||||||
|
- switch.master_bedroom_aircon
|
||||||
default:
|
default:
|
||||||
- service: script.text_notify_tony
|
- service: script.text_notify_tony
|
||||||
data:
|
data:
|
||||||
@ -529,12 +562,4 @@
|
|||||||
message: '"Today''s wakeup time is set to {{ states(''input_datetime.master_bedroom_wakeup'')
|
message: '"Today''s wakeup time is set to {{ states(''input_datetime.master_bedroom_wakeup'')
|
||||||
}} and tonight''s cooling is set to start at {{ states(''input_datetime.master_bedroom_cooling'')
|
}} and tonight''s cooling is set to start at {{ states(''input_datetime.master_bedroom_cooling'')
|
||||||
}}"'
|
}}"'
|
||||||
- if:
|
mode: queued
|
||||||
- condition: trigger
|
|
||||||
id: master-bedroom-wakeup
|
|
||||||
then:
|
|
||||||
- service: fan.turn_off
|
|
||||||
data: {}
|
|
||||||
target:
|
|
||||||
entity_id: fan.master_bedroom_fan_socket_1
|
|
||||||
mode: single
|
|
||||||
|
@ -33,8 +33,13 @@ master_bedroom_cooling:
|
|||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:fan-auto
|
icon: mdi:fan-auto
|
||||||
|
master_bedroom_fan:
|
||||||
|
name: Master Bedroom Fan
|
||||||
|
has_date: false
|
||||||
|
has_time: true
|
||||||
|
icon: mdi:fan-auto
|
||||||
master_bedroom_wakeup:
|
master_bedroom_wakeup:
|
||||||
name: Master Bedroom Wakeup
|
name: Master Bedroom Wakeup
|
||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:fan-off
|
icon: mdi:fan-off
|
||||||
|
@ -113,12 +113,25 @@ automation:
|
|||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% set low = state_attr('sensor.current_forecast','overnight_low') | float %}
|
{% set low = state_attr('sensor.current_forecast','overnight_low') | float %}
|
||||||
{% if low > 55 and low < 60 %}
|
{% set high = state_attr('sensor.current_forecast','high_temp') | float %}
|
||||||
|
{% if high > 85 and is_state('sensor.school_tomorrow','on') %}
|
||||||
|
20:00
|
||||||
|
{% elif high > 85 and is_state('sensor.school_tomorrow','off') %}
|
||||||
|
21:00
|
||||||
|
{% elif low > 55 and low < 60 %}
|
||||||
22:00
|
22:00
|
||||||
{% elif low > 60 %}
|
{% elif low > 60 %}
|
||||||
21:00
|
21:30
|
||||||
{% elif low > 48 and low < 55 %}
|
|
||||||
00:00
|
|
||||||
{% else %}
|
{% else %}
|
||||||
05:00
|
00:00
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
- service: input_datetime.set_datetime
|
||||||
|
entity_id: input_datetime.master_bedroom_fan
|
||||||
|
data_template:
|
||||||
|
time: >
|
||||||
|
{% set low = state_attr('sensor.current_forecast','overnight_low') | float %}
|
||||||
|
{% if low > 60 %}
|
||||||
|
22:00
|
||||||
|
{% else %}
|
||||||
|
00:00
|
||||||
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user