scripts.yaml 2.73 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
    - 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
Erick Hitter's avatar
Erick Hitter committed
48
          - light.erick_s_desk_lamp
Erick Hitter's avatar
Erick Hitter committed
49

Erick Hitter's avatar
Erick Hitter committed
50
51
52
# Den lights timeout
den_lights_set_timeout:
  alias: "Set timeout for den lights"
Erick Hitter's avatar
Erick Hitter committed
53
54
55
56
  sequence:
    # Cancel ev. old timers
    - service: script.turn_off
      data:
Erick Hitter's avatar
Erick Hitter committed
57
        entity_id: script.den_lights_timeout
Erick Hitter's avatar
Erick Hitter committed
58
59
60
    # Set new timer
    - service: script.turn_on
      data:
Erick Hitter's avatar
Erick Hitter committed
61
        entity_id: script.den_lights_timeout
Erick Hitter's avatar
Erick Hitter committed
62

Erick Hitter's avatar
Erick Hitter committed
63
64
den_lights_timeout:
  alias: "Turn off den lights after one hour of inactivity"
Erick Hitter's avatar
Erick Hitter committed
65
66
  sequence:
    - delay:
Erick Hitter's avatar
Erick Hitter committed
67
        hours: 1
Erick Hitter's avatar
Erick Hitter committed
68
69
70
    - service: light.turn_off
      data:
        entity_id:
Erick Hitter's avatar
Erick Hitter committed
71
72
73
74
75
          - light.den_left
          - light.den_right
    - service: switch.turn_off
      data:
        entity_id: switch.lava_lamp
Erick Hitter's avatar
Erick Hitter committed
76

Erick Hitter's avatar
Erick Hitter committed
77
78
79
# Common Area timeout
common_area_set_timeout:
  alias: "Set timeout for common area items"
Erick Hitter's avatar
Erick Hitter committed
80
81
82
83
  sequence:
    # Cancel ev. old timers
    - service: script.turn_off
      data:
Erick Hitter's avatar
Erick Hitter committed
84
         entity_id: script.common_area_timeout
Erick Hitter's avatar
Erick Hitter committed
85
86
87
    # Set new timer
    - service: script.turn_on
      data:
Erick Hitter's avatar
Erick Hitter committed
88
        entity_id: script.common_area_timeout
Erick Hitter's avatar
Erick Hitter committed
89

Erick Hitter's avatar
Erick Hitter committed
90
91
common_area_timeout:
  alias: "Turn off common area items after two hours of inactivity"
Erick Hitter's avatar
Erick Hitter committed
92
93
94
95
96
97
  sequence:
    - delay:
        hours: 2
    - service: light.turn_off
      data:
        entity_id:
Erick Hitter's avatar
Erick Hitter committed
98
99
100
101
102
103
104
105
          - light.living_room_endtable_left
          - light.living_room_endtable_right
          - light.living_room_left
          - light.living_room_center
          - light.living_room_right
          - light.kitchen_entrance
          - light.entryway
          - light.dining_corner
Erick Hitter's avatar
Erick Hitter committed
106
107
    - service: switch.turn_off
      data:
Erick Hitter's avatar
Erick Hitter committed
108
109
110
        entity_id:
          - switch.fireplace
          - switch.over_front_door