Rework of E's climate control script
This commit is contained in:
@ -184,35 +184,42 @@ automation:
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.emma_bedtime
|
||||
conditions:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
||||
state: 'AC'
|
||||
then:
|
||||
- service: fan.turn_on
|
||||
target:
|
||||
entity_id: fan.emma_air_conditioner
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
||||
state: AC
|
||||
sequence:
|
||||
- service: fan.turn_on
|
||||
target:
|
||||
entity_id: fan.emma_air_conditioner
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: "parents"
|
||||
title: "Emma Climate Schedule"
|
||||
message: "The air conditioner in Emma's Bedroom has been activated."
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
||||
state: White Noise
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.white_noise_emma_bedroom
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: "parents"
|
||||
title: "Emma Climate Schedule"
|
||||
message: "White noise has been activated in Emma's Bedroom."
|
||||
default:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: "parents"
|
||||
title: "Emma Climate Schedule"
|
||||
message: "The air conditioner in Emma's Bedroom has been activated."
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
||||
state: 'White Noise'
|
||||
then:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.white_noise_emma_bedroom
|
||||
- service: script.text_notify
|
||||
data:
|
||||
who: "parents"
|
||||
title: "Emma Climate Schedule"
|
||||
message: "White noise has been activated in Emma's Bedroom."
|
||||
message: "No option selected for Emma's climate mode. No devices will be activated."
|
||||
mode: restart
|
||||
|
Reference in New Issue
Block a user