-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.yaml
298 lines (294 loc) · 11.5 KB
/
Card.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
type: custom:stack-in-card
cards:
- type: custom:stack-in-card
entity: light.family_room_lights
cards:
- type: custom:mushroom-template-card
primary: Family room
secondary: >-
{{ '{0:.2f}'.format( ( states('sensor.family_room_temp')|float))}}°C |
{{'{0:.0f}'.format((states('sensor.family_room_humidity') |float))}}%
icon: mdi:sofa
icon_color: |-
{% if is_state(config.entity, 'on') %}
{% if state_attr(config.entity,'rgb_color') != none %}
{{state_attr(config.entity,'rgb_color')[0] * 0.5, state_attr(config.entity,'rgb_color')[1] * 0.5, state_attr(config.entity,'rgb_color')[2] * 0.5 }}
{% else %}
#694311
{% endif %}
{% else %}
#ba03fc
{% endif %}
tap_action:
action: navigate
navigation_path: '#family'
hold_action:
action: call-service
service: light.toggle
target:
entity_id:
- light.family_room_lights
data: {}
double_tap_action:
action: none
fill_container: false
entity: light.family_room_lights
multiline_secondary: false
badge_icon: ''
badge_color: ''
card_mod:
style: |
ha-card {
padding-bottom: 0px !important;
}
mushroom-shape-icon {
position: absolute;
top: -57px;
left: -40px;
}
mushroom-state-info {
padding-left: 34px;
z-index: 1;
}
:host {
--mush-icon-size: 2.84em;
--mush-icon-symbol-size: 1em
}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: light.family_room_lights
double_tap_action:
action: none
tap_action:
action: none
hold_action:
action: none
content: ''
icon: |-
{% if expand(states.light)
|selectattr('state', 'eq', 'on')
|selectattr('entity_id', 'in', area_entities('Family Room'))
|rejectattr('entity_id', 'search', 'master')
|map(attribute='entity_id')
|list | count > 1
%}
mdi:lightbulb-multiple
{% else %}
mdi:lightbulb
{% endif %}
icon_color: |-
{% if expand(states.light)
|selectattr('state', 'eq', 'on')
|selectattr('entity_id', 'in', area_entities('Family Room'))
|rejectattr('entity_id', 'search', 'master')
|map(attribute='entity_id')
|list | count > 0
%}
{% if state_attr(config.entity,'rgb_color') != none %}
{{state_attr(config.entity,'rgb_color')[0] * 0.5, state_attr(config.entity,'rgb_color')[1] * 0.5, state_attr(config.entity,'rgb_color')[2] * 0.5 }}
{% else %}
#694311
{% endif %}
{% else %}
none
{% endif %}
card_mod:
style: |
ha-card {
{% if states(config.entity) == 'on' %}
{% if state_attr(config.entity,'rgb_color') != none %}
background-color: rgba{{(state_attr(config.entity,'rgb_color')[0] * 0.85, state_attr(config.entity,'rgb_color')[1] * 0.85, state_attr(config.entity,'rgb_color')[2] * 0.85) + (0.6,)}} !important;
{% else %}
background-color: rgba(105, 67, 17, 0.2) !important;
{% endif %}
{% else %}
background-color: rgba(var(--rgb-disabled), 0.2) !important;
{% endif %}
box-shadow: none !important;
border: none !important;
min-width: 0px !important;
width: 32px !important;
height: 32px !important;
justify-content: center;
}
ha-card::after {
content: '{{ expand(states.light) |selectattr('state', 'eq', 'on') |selectattr('entity_id', 'in', area_entities('Family Room')) |rejectattr('entity_id', 'search', 'master') |map(attribute='entity_id') |list | count }}';
position: absolute;
top: -11%;
right: -11%;
display: flex;
justify-content: center;
align-items: center;
width: 15px;
height: 15px;
font-size: 9px;
font-weight: 700;
{% if states(config.entity) == 'on' %}
{% if state_attr(config.entity,'rgb_color') != none %}
background-color: rgba{{(state_attr(config.entity,'rgb_color')[0] * 0.65, state_attr(config.entity,'rgb_color')[1] * 0.65, state_attr(config.entity,'rgb_color')[2] * 0.65) + (0.6,)}} !important;
{% else %}
background-color: rgba(105, 67, 17, 0.5) !important;
{% endif %}
{% else %}
background-color: rgba(var(--rgb-disabled), 0.5) !important;
{% endif %}
border-radius: 50%;
}
- type: template
icon: mdi:monitor-dashboard
icon_color: '#e85c10'
content: ''
double_tap_action:
action: none
tap_action:
action: none
hold_action:
action: none
card_mod:
style: |
ha-card {
{% if states('light.family_room_lights') == 'on' %}
background-color: rgba{{(state_attr('light.family_room_lights','rgb_color')[0] * 0.85, state_attr('light.family_room_lights','rgb_color')[1] * 0.85, state_attr('light.family_room_lights','rgb_color')[2] * 0.85) + (0.6,)}} !important;
{% else %}
background-color: rgba(var(--rgb-disabled), 0.2) !important;
{% endif %}
box-shadow: none !important;
border: none !important;
min-width: 0px !important;
width: 32px !important;
height: 32px !important;
justify-content: center;
}
ha-card::after {
content: '{{states('group.media_center') | round }}';
position: absolute;
top: -11%;
right: -11%;
display: flex;
justify-content: center;
align-items: center;
width: 15px;
height: 15px;
font-size: 9px;
font-weight: 700;
background: rgba(232, 92, 16, 0.5);
border-radius: 50%;
}
- type: template
icon: mdi:door-open
icon_color: '#ff6f00'
content: ''
double_tap_action:
action: none
tap_action:
action: none
hold_action:
action: none
card_mod:
style: |
ha-card {
{% if states('light.family_room_lights') == 'on' %}
background-color: rgba{{(state_attr('light.family_room_lights','rgb_color')[0] * 0.85, state_attr('light.family_room_lights','rgb_color')[1] * 0.85, state_attr('light.family_room_lights','rgb_color')[2] * 0.85) + (0.6,)}} !important;
{% else %}
background-color: rgba(var(--rgb-disabled), 0.2) !important;
{% endif %}
box-shadow: none !important;
border: none !important;
min-width: 0px !important;
width: 32px !important;
height: 32px !important;
justify-content: center;
}
- type: template
icon: mdi:microsoft-xbox
icon_color: white
content: ''
double_tap_action:
action: none
tap_action:
action: none
hold_action:
action: none
card_mod:
style: |
ha-card {
{% if states('light.family_room_lights') == 'on' %}
background-color: rgba{{(state_attr('light.family_room_lights','rgb_color')[0] * 0.85, state_attr('light.family_room_lights','rgb_color')[1] * 0.85, state_attr('light.family_room_lights','rgb_color')[2] * 0.85) + (0.6,)}} !important;
{% else %}
background-color: rgba(var(--rgb-disabled), 0.2) !important;
{% endif %}
box-shadow: none !important;
border: none !important;
min-width: 0px !important;
width: 32px !important;
height: 32px !important;
justify-content: center;
}
ha-card::after {
content: '{{states('media_player.xboxone') | round }}';
position: absolute;
top: -11%;
right: -11%;
display: flex;
justify-content: center;
align-items: center;
width: 15px;
height: 15px;
font-size: 9px;
font-weight: 700;
background: rgba(232, 92, 16, 0.5);
border-radius: 50%;
}
alignment: end
card_mod:
style:
.: |
mushroom-template-chip:nth-child(1) {
{% if states('light.family_room_lights') == 'off' %}
margin-right: 0px;
display: none !important;
{% else %}
{% endif %}
}
mushroom-template-chip:nth-child(2) {
{% if states('group.media_center') == 'off' %}
margin-right: 0px;
display: none;
{% else %}
{% endif %}
}
mushroom-template-chip:nth-child(3) {
{% if states('binary_sensor.front_door') == 'off' %}
margin-right: 0px;
display: none;
{% else %}
{% endif %}
}
mushroom-template-chip:nth-child(4) {
{% if states('media_player.xboxone') == 'off' %}
margin-right: 0px;
display: none;
{% else %}
{% endif %}
}
ha-card {
--chip-spacing: 3px;
padding-right: 5px;
padding-bottom: 2px;
height: 35px;
}
card_mod:
style: |
ha-card {
{% if is_state(config.entity,'on') %}
--primary-text-color: #1f1f1f !important;
--secondary-text-color: #292929;
background-color: rgba{{state_attr(config.entity,'rgb_color') + (1,)}}
{% endif %};
}
card_mod:
style: |
ha-card {
--ha-card-border-width: 0;
}