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,17 +336,15 @@
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
sequence: then:
- choose: - if:
- conditions:
- condition: numeric_state - condition: numeric_state
entity_id: sensor.pirateweather_temperature entity_id: sensor.pirateweather_temperature
below: '40' below: '40'
sequence: then:
- service: script.speech_engine - service: script.speech_engine
data: data:
who: kallen_bedroom who: kallen_bedroom
@ -365,24 +363,27 @@
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 - service: script.speech_engine
data: data:
who: kallen_bedroom who: kallen_bedroom
message: Fan on. Stay cool! message: Fan on. Stay cool!
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: media_player.volume_set - service: media_player.volume_set
data: data:
volume_level: 0.3 volume_level: 0.3
target:
entity_id: media_player.kallen_bedroom_speaker
- service: fan.turn_on - service: fan.turn_on
data: {} data: {}
target: target:
entity_id: fan.kallen_fan_socket_1 entity_id: fan.kallen_fan_socket_1
- conditions: - if:
- condition: trigger - condition: trigger
id: kallen-morning id: kallen-morning
sequence: then:
- service: fan.turn_off - service: fan.turn_off
data: {} data: {}
target: target:
@ -391,7 +392,6 @@
data: {} data: {}
target: target:
entity_id: input_boolean.white_noise_kallen_bedroom entity_id: input_boolean.white_noise_kallen_bedroom
default: []
mode: single mode: single
- id: '1650918265367' - id: '1650918265367'
alias: Speedtest Schedule alias: Speedtest Schedule