######################################################################
##  Weekday Morning Routines for the Wife and Kiddos.
######################################################################

- alias: 'Good Morning Routine'
  trigger:
    - platform: state
      entity_id: input_boolean.good_morning
      to: 'on'
      from: 'off'
    - platform: state
      entity_id:
        - binary_sensor.sleepnumber_carlo_stacey_is_in_bed
      to: 'off'

  condition:
    - condition: state
      entity_id: group.family
      state: home
    - condition: state
      entity_id: input_boolean.school_mode
      state: 'on'
    - condition: time
      after: '06:00:00'
      before: '10:00:00'
    - condition: time
      weekday:
        - mon
        - tue
        - wed
        - thu
        - fri

  action:
    - delay: 00:20:00
    - service: light.turn_on
      entity_id:
        - light.s1
        - light.s4
    - service: switch.turn_on
      entity_id: switch.kitchen_accents
    - service: input_boolean.turn_off
      entity_id: input_boolean.good_morning