scripts.yaml 3.76 KB
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# 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:
Erick Hitter's avatar
Erick Hitter committed
21
        hours: 5
Erick Hitter's avatar
Erick Hitter committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
    - 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
Erick Hitter's avatar
Erick Hitter committed
100 101 102 103
# Restart August Lock daemon
restart_august_daemon:
  sequence:
    - service: shell_command.restart_august_daemon
Erick Hitter's avatar
Erick Hitter committed
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
# 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
Erick Hitter's avatar
Erick Hitter committed
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142

# 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:
Erick Hitter's avatar
Erick Hitter committed
143
  alias: "Turn off kitchen light after 15 minutes of inactivity"
Erick Hitter's avatar
Erick Hitter committed
144 145
  sequence:
    - delay:
Erick Hitter's avatar
Erick Hitter committed
146
        minutes: 15
Erick Hitter's avatar
Erick Hitter committed
147 148 149
    - service: switch.turn_off
      data:
        entity_id: switch.kitchen