# 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: 3
    - 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.ericks_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
# Restart August Lock daemon
restart_august_daemon:
  sequence:
    - service: shell_command.restart_august_daemon
# Force lock keyed
force_lock_keyed:
  sequence:
    - service: shell_command.force_lock_keyed
# Force unlock keyed
force_unlock_keyed:
  sequence:
    - service: shell_command.force_unlock_keyed
# Force disconnect keyed
force_disconnect_keyed:
  sequence:
    - service: shell_command.force_disconnect_keyed
# Force lock interior
force_lock_interior:
  sequence:
    - service: shell_command.force_lock_interior
# Force unlock interior
force_unlock_interior:
  sequence:
    - service: shell_command.force_unlock_interior
# Force disconnect interior
force_disconnect_interior:
  sequence:
    - service: shell_command.force_disconnect_interior

# 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