-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlovelace.yaml
102 lines (102 loc) · 3.91 KB
/
lovelace.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
- type: vertical-stack
cards:
- show_name: true
show_icon: true
icon: mdi:water-pump
icon_height: 35px
entity: button.water_pump
name: Water Plant
show_state: false
type: button
tap_action:
action: call-service
service: mqtt.publish
data:
topic: waterer/waterpump
payload: Requested
target: {}
double_tap_action:
action: call-service
service: mqtt.publish
data:
topic: waterer/waterpump
payload: Cancelled
target: {}
hold_action:
action: call-service
service: mqtt.publish
data:
topic: waterer/restart
payload: Reboot
target: {}
card_mod:
style: |
:host {
--paper-item-icon-color: {{
'#00FF00' if is_state('sensor.waterer_status', 'Moist') else
'#FF0000' if is_state('sensor.waterer_status', 'Dry') else
'#0000FF' }};
}
ha-card {
margin: 0 75px 0 75px;
line-height: 4px;
--ha-card-border-radius: 100px;
}
- type: entities
entities:
- entity: sensor.waterer_status
name: Soil State
icon: mdi:sprout
card_mod:
style: |
:host {
--paper-item-icon-color: {{
'#00FF00' if is_state('sensor.waterer_status', 'Moist') else
'#FF0000' if is_state('sensor.waterer_status', 'Dry') else
'#0000FF' }};
}
- entity: sensor.waterer_moisture
name: Moisture
icon: mdi:water
card_mod:
style: |
:host {
--paper-item-icon-color: {{
'#00FF00' if is_state('sensor.waterer_status', 'Moist') else
'#FF0000' if is_state('sensor.waterer_status', 'Dry') else
'#0000FF' }};
}
- entity: sensor.waterer_pump
name: Pump
icon: mdi:water-pump
card_mod:
style: |
:host {
--paper-item-icon-color: {{
'#FFFF00' if is_state('sensor.waterer_pump', 'Requested') else
'#CC6600' if is_state('sensor.waterer_pump', 'Cancelled') else
'#00FFFF' if is_state('sensor.waterer_pump', 'Low Water') else
'#00FF00' }};
}
state_color: true
- show_name: true
show_icon: true
show_state: true
type: glance
entities:
- entity: sensor.kid_room_temp
card_mod:
style: |
:host {
--paper-item-icon-color: {{ '#FF3333' if
states('sensor.kid_room_temp') | float > 20 else '#CC6600' if
states('sensor.kid_room_temp') | float > 15 else '#0000CC' }};
}
- entity: sensor.kid_room_humidity
card_mod:
style: >
:host {
--paper-item-icon-color: {{ '#00FFFF' if
states('sensor.kid_room_humidity') | float > 60 else '#00FF00' if
states('sensor.kid_room_humidity') | float > 15 else '#CCCC00' }};
}