Some bugfixes to master bedroom climate handling

This commit is contained in:
2023-06-21 16:15:36 -04:00
parent 818192c3ce
commit 2216c5f623
2 changed files with 24 additions and 7 deletions

Submodule node-red/projects/NerdFlows updated: f60c0fb436...9c3cd70ca2

View File

@ -36,6 +36,9 @@ automation:
- condition: state
entity_id: group.adults
state: home
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- choose:
- conditions:
@ -84,6 +87,15 @@ script:
sequence:
- variables:
brightness: "{{ state_attr('switch.adaptive_lighting_master_bedroom','brightness_pct') }}"
- if:
- condition: template
value_template: >
{% from 'time.jinja' import ct %}
{% set ct = ct() | int %}
{% set cooling = state_attr('input_datetime.master_bedroom_cooling','timestamp') | int %}
{% set wakeup = state_attr('input_datetime.master_bedroom_wakeup','timestamp') | int %}
{{ 21600 < ct < cooling }}
then:
- service: button.press
target:
entity_id: button.master_bedroom_day_mode
@ -152,6 +164,11 @@ script:
alias: 'Master Bedroom Sleep'
mode: restart
sequence:
- if:
- condition: state
entity_id: input_boolean.night_mode
state: 'off'
then:
- service: button.press
target:
entity_id: button.master_bedroom_night_mode