# Wireless charger
wireless_charger_set_timeout:
  alias: "Set timeout on wireless charger"
  sequence:
    # Cancel ev. old timers
    - service: script.turn_off
      data:
         entity_id: script.wireless_charger_timeout
    - service: switch.turn_on
      data:
        entity_id: switch.wireless_charger
    # Set new timer
    - service: script.turn_on
      data:
        entity_id: script.wireless_charger_timeout

wireless_charger_timeout:
  alias: "Turn off wireless charger after three hours"
  sequence:
    - delay:
        hours: 5
    - service: switch.turn_off
      data:
        entity_id: switch.wireless_charger

# Office lights timeout
office_lights_set_timeout:
  alias: "Set timeout for office lights"
  sequence:
    # Cancel ev. old timers
    - service: script.turn_off
      data:
         entity_id: script.office_lights_timeout
    # Set new timer
    - service: script.turn_on
      data:
        entity_id: script.office_lights_timeout

office_lights_timeout:
  alias: "Turn off office lights after one hour of inactivity"
  sequence:
    - delay:
        hours: 1
    - service: light.turn_off
      data:
        entity_id:
          - light.office
          - light.erick_s_desk_lamp
    - service: switch.turn_off
      data:
        entity_id: switch.lava_lamp

# Living Room lights timeout
living_room_lights_set_timeout:
  alias: "Set timeout for living room lights"
  sequence:
    # Cancel ev. old timers
    - service: script.turn_off
      data:
         entity_id: script.living_room_lights_timeout
    # Set new timer
    - service: script.turn_on
      data:
        entity_id: script.living_room_lights_timeout

living_room_lights_timeout:
  alias: "Turn off living room lights after two hours of inactivity"
  sequence:
    - delay:
        hours: 2
    - service: light.turn_off
      data:
        entity_id:
          - light.endtable
          - light.corner_table

# Dining Area lights timeout
dining_area_lights_set_timeout:
  alias: "Set timeout for dining area lights"
  sequence:
    # Cancel ev. old timers
    - service: script.turn_off
      data:
         entity_id: script.dining_area_lights_timeout
    # Set new timer
    - service: script.turn_on
      data:
        entity_id: script.dining_area_lights_timeout

dining_area_lights_timeout:
  alias: "Turn off dining area lights after two hours of inactivity"
  sequence:
    - delay:
        hours: 2
    - service: light.turn_off
      data:
        entity_id:
          - light.ceiling_fan_1
          - light.ceiling_fan_2

# Kitchen light timeout
kitchen_light_set_timeout:
  alias: "Set timeout for kitchen light"
  sequence:
    # Cancel ev. old timers
    - service: script.turn_off
      data:
         entity_id: script.kitchen_light_timeout
    # Set new timer
    - service: script.turn_on
      data:
        entity_id: script.kitchen_light_timeout

kitchen_light_timeout:
  alias: "Turn off kitchen light after 15 minutes of inactivity"
  sequence:
    - delay:
        minutes: 15
    - service: switch.turn_off
      data:
        entity_id: switch.kitchen
