Changed K's bedtime script to new if-then feature

This commit is contained in:
2022-05-04 18:49:39 -04:00
parent 582604c385
commit f817363ae4

View File

@ -336,62 +336,62 @@
entity_id: binary_sensor.people_present entity_id: binary_sensor.people_present
state: 'on' state: 'on'
action: action:
- choose: - if:
- conditions: - condition: trigger
- condition: trigger id: kallen-night
id: kallen-night then:
sequence: - if:
- choose: - condition: numeric_state
- conditions: entity_id: sensor.pirateweather_temperature
- condition: numeric_state below: '40'
entity_id: sensor.pirateweather_temperature then:
below: '40' - service: script.speech_engine
sequence: data:
- service: script.speech_engine who: kallen_bedroom
data: message: No fan tonight, too cold outside! Brrrr!
who: kallen_bedroom - delay:
message: No fan tonight, too cold outside! Brrrr! hours: 0
- delay: minutes: 0
hours: 0 seconds: 5
minutes: 0 milliseconds: 0
seconds: 5 - service: media_player.volume_set
milliseconds: 0 data:
- service: media_player.volume_set volume_level: 0.3
data:
volume_level: 0.3
target:
entity_id: media_player.kallen_bedroom_speaker
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.white_noise_kallen_bedroom
default:
- service: script.speech_engine
data:
who: kallen_bedroom
message: Fan on. Stay cool!
- service: media_player.volume_set
data:
volume_level: 0.3
target:
entity_id: media_player.kallen_bedroom_speaker
- service: fan.turn_on
data: {}
target:
entity_id: fan.kallen_fan_socket_1
- conditions:
- condition: trigger
id: kallen-morning
sequence:
- service: fan.turn_off
data: {}
target: target:
entity_id: fan.kallen_fan_socket_1 entity_id: media_player.kallen_bedroom_speaker
- service: input_boolean.turn_off - service: input_boolean.turn_on
data: {} data: {}
target: target:
entity_id: input_boolean.white_noise_kallen_bedroom entity_id: input_boolean.white_noise_kallen_bedroom
default: [] else:
- service: script.speech_engine
data:
who: kallen_bedroom
message: Fan on. Stay cool!
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: media_player.volume_set
data:
volume_level: 0.3
- service: fan.turn_on
data: {}
target:
entity_id: fan.kallen_fan_socket_1
- if:
- condition: trigger
id: kallen-morning
then:
- service: fan.turn_off
data: {}
target:
entity_id: fan.kallen_fan_socket_1
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.white_noise_kallen_bedroom
mode: single mode: single
- id: '1650918265367' - id: '1650918265367'
alias: Speedtest Schedule alias: Speedtest Schedule