-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhasp_Theme_Dark_on_Light.yaml
72 lines (64 loc) · 2.41 KB
/
hasp_Theme_Dark_on_Light.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
blueprint:
name: "HASP Theme Dark on Light"
description: |
## Description
Press EXECUTE to apply the theme Dark on Light to the selected HASP device
![Preview](https://raw.githubusercontent.com/HASwitchPlate/Blueprints/main/images/hasp_Theme_Dark_on_Light.png)
source_url: "https://github.com/HASwitchPlate/Blueprints/blob/main/hasp_Theme_Dark_on_Light.yaml"
domain: automation
input:
haspconnected:
name: "HASP Device"
description: "Select the HASP device"
selector:
entity:
integration: mqtt
domain: binary_sensor
device_class: connectivity
mode: single
max_exceeded: silent
variables:
haspconnected: !input haspconnected
haspname: '{{ haspconnected.split(".")[1].split("_connected")[0] }}'
selected_foreground_brightness: "1"
selected_foreground_color: "[255, 255, 255]"
selected_background_brightness: "255"
selected_background_color: "[255, 255, 255]"
unselected_foreground_brightness: "224"
unselected_foreground_color: "[255, 255, 255]"
unselected_background_brightness: "96"
unselected_background_color: "[255, 255, 255]"
trigger: []
action:
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_selected_foreground_color"
rgb_color: "{{selected_foreground_color}}"
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_selected_foreground_color"
brightness: "{{selected_foreground_brightness}}"
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_selected_background_color"
rgb_color: "{{selected_background_color}}"
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_selected_background_color"
brightness: "{{selected_background_brightness}}"
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_unselected_foreground_color"
rgb_color: "{{unselected_foreground_color}}"
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_unselected_foreground_color"
brightness: "{{unselected_foreground_brightness}}"
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_unselected_background_color"
rgb_color: "{{unselected_background_color}}"
- service: light.turn_on
data:
entity_id: "light.{{haspname}}_unselected_background_color"
brightness: "{{unselected_background_brightness}}"