-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
106 lines (106 loc) · 2.71 KB
/
automations.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
100
101
102
103
104
105
106
- id: '1658030651655'
alias: Bedside Light Dim Control
description: ''
trigger:
- platform: device
domain: mqtt
device_id: 7fe49afed3dcf831f98f95cb3a9eee3f
type: action
subtype: single
discovery_id: 0x00158d0007edb8a9 action_single
id: on_press
enabled: true
- platform: device
domain: mqtt
device_id: 7fe49afed3dcf831f98f95cb3a9eee3f
type: action
subtype: release
discovery_id: 0x00158d0007edb8a9 action_release
id: on_release
- platform: device
domain: mqtt
device_id: 7fe49afed3dcf831f98f95cb3a9eee3f
type: action
subtype: hold
discovery_id: 0x00158d0007edb8a9 action_hold
id: on_hold
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: on_press
sequence:
- service: light.toggle
data:
brightness: 70
transition: 1
target:
entity_id: light.timbedsidelight
- conditions:
- condition: trigger
id: on_hold
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id:
- input_boolean.bedsidelightdimstatus
- if:
- condition: state
entity_id: input_boolean.dimswitchstate
state: 'on'
then:
- repeat:
while:
- condition: state
entity_id: input_boolean.bedsidelightdimstatus
state: 'on'
sequence:
- service: light.turn_on
data:
brightness_step: 3
target:
entity_id: light.timbedsidelight
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 70
else:
- repeat:
while:
- condition: state
entity_id: input_boolean.bedsidelightdimstatus
state: 'on'
sequence:
- service: light.turn_on
data:
brightness_step: -3
target:
entity_id: light.timbedsidelight
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 70
- conditions: []
sequence:
- choose:
- conditions:
- condition: trigger
id: on_release
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.bedsidelightdimstatus
- service: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.dimswitchstate
default: []
default: []
mode: parallel
max: 3