-
Notifications
You must be signed in to change notification settings - Fork 0
/
automations.yaml
43 lines (40 loc) · 1.05 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
- alias: Turn Office Lights Off
trigger:
- platform: mqtt
topic: "home/office/lights/off"
action:
- service: light.turn_off
target:
entity_id: light.office
- alias: Turn Office Lights On
trigger:
- platform: mqtt
topic: "home/office/lights/on"
action:
- service: light.turn_on
target:
entity_id: light.office
data:
color_name: "white"
# payload must be a valid CSS3 color name: https://www.w3.org/wiki/CSS/Properties/color/keywords
- alias: Set Office Light Color by Name
trigger:
- platform: mqtt
topic: "home/office/lights/color/name"
action:
- service: light.turn_on
target:
entity_id: light.office
data:
color_name: "{{ trigger.payload }}"
# payload must be in the format of [255,255,255]
- alias: Set Office Light Color by RGB
trigger:
- platform: mqtt
topic: "home/office/lights/color/rgb"
action:
- service: light.turn_on
target:
entity_id: light.office
data:
rgb_color: "{{ trigger.payload }}"