mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
40 lines
973 B
YAML
40 lines
973 B
YAML
alias: Kristy in Bed
|
|
id: automation_kristy_in_bed
|
|
|
|
trigger:
|
|
# Bed in master bedroom is occupied
|
|
- platform: state
|
|
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_left
|
|
to: 'on'
|
|
# Radio playing
|
|
- platform: state
|
|
entity_id: media_player.master_bedroom_clock
|
|
to: 'playing'
|
|
- platform: state
|
|
entity_id: media_player.master_bedroom_clock
|
|
to: 'idle'
|
|
# Light on
|
|
- platform: state
|
|
entity_id: light.master_bedroom_hue
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.kristy_in_bed
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.kristy_home
|
|
state: 'on'
|
|
- alias: "Its between 8:30PM and 5AM"
|
|
condition: time
|
|
after: '20:30:00'
|
|
before: '05:00:00'
|
|
|
|
- alias: "The bed is occupied"
|
|
condition: state
|
|
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_left
|
|
state: 'on'
|
|
action:
|
|
- service: input_boolean.turn_on
|
|
entity_id: input_boolean.kristy_in_bed
|
|
|