alias: Adults Awake id: automation_adults_awake mode: restart trigger: # Consider the house awake if it is after 4:30AM and Kristy and I are both home and awake - platform: state entity_id: - binary_sensor.adults_in_bed - input_boolean.clint_in_bed - input_boolean.clint_is_awake - input_boolean.kristy_in_bed - input_boolean.kristy_is_awake - binary_sensor.bed_presence_c175a4_bed_occupied_either - platform: time id: wake_clint at: input_datetime.clint_next_alarm - platform: state id: late_morning entity_id: binary_sensor.late_morning from: "off" to: "on" - platform: homeassistant event: start condition: - condition: time after: "04:30:00" - condition: time before: "10:00:00" - condition: or conditions: - condition: trigger id: late_morning - condition: trigger id: wake_clint - condition: state entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either state: "off" for: "00:10:00" - condition: and conditions: - condition: or conditions: - condition: state entity_id: input_boolean.kristy_home state: "off" - condition: and conditions: - condition: or conditions: - condition: state entity_id: input_boolean.kristy_is_awake state: "on" - condition: state entity_id: input_boolean.kristy_in_bed state: "off" - condition: state entity_id: input_boolean.kristy_home state: "on" - condition: or conditions: - condition: state entity_id: input_boolean.clint_home state: "off" - condition: and conditions: - condition: state entity_id: input_boolean.clint_home state: "on" - condition: or conditions: - condition: state entity_id: input_boolean.clint_is_awake state: "on" - condition: state entity_id: input_boolean.clint_in_bed state: "off" action: - action: input_boolean.turn_off entity_id: - input_boolean.bedtime - input_boolean.asleep - input_boolean.master_bedroom_asleep - action: input_select.select_option target: entity_id: input_select.master_bedroom_mode data: option: Auto