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
| type: picture-elements
elements:
- type: conditional
conditions:
- condition: state
state_not: unavailable
entity: sensor.p1s_01p00c5b2502053_ams_1_id
- condition: state
state_not: unknown
entity: sensor.p1s_01p00c5b2502053_ams_1_id
elements:
- type: state-label
entity: sensor.p1s_01p00c5b2502053_ams_1_id
tap_action:
action: none
style:
top: 77%
left: 9.6%
text-align: center
font-size: 0.8em
background-color: rgba(0,0,0,0)
box-shadow: 0 0 3px 3px rgba(0, 0, 0, 0)
border-radius: 10px
pointer-events: none
color: "#FFFFFF"
- type: custom:config-template-card
entities:
- sensor.p1s_01p00c5b2502053_ams_1_tray_1
element:
type: state-icon
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_1
icon: >-
${states['sensor.p1s_01p00c5b2502053_ams_1_tray_1'].state.toLowerCase()
!= 'empty' ? 'phu:3d-filament' : 'mdi:tray' }
style:
top: 28%
left: 21.4%
"--paper-item-icon-color": var(--tray_1_color)
color: var(--tray_1_color)
background-color: rgba(0,0,0,0.5)
box-shadow: 0 0 5px 5px var(--tray_1_bg)
border-radius: 50px
"--mdc-icon-size": 2.4em
- type: state-label
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_1
attribute: type
tap_action:
action: none
style:
top: 77%
left: 21%
text-align: center
font-size: 1em
background-color: rgba(0,0,0,0.4)
box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
border-radius: 50px
pointer-events: none
color: "#FFFFFF"
- type: custom:config-template-card
entities:
- sensor.p1s_01p00c5b2502053_ams_1_tray_2
element:
type: state-icon
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_2
icon: >-
${states['sensor.p1s_01p00c5b2502053_ams_1_tray_2'].state.toLowerCase()
!= 'empty' ? 'phu:3d-filament' : 'mdi:tray' }
style:
top: 28%
left: 39.7%
"--paper-item-icon-color": var(--tray_2_color)
background-color: rgba(0,0,0,0.5)
box-shadow: 0 0 5px 5px var(--tray_2_bg)
border-radius: 50px
"--mdc-icon-size": 2.4em
- type: state-label
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_2
attribute: type
tap_action:
action: none
style:
top: 77%
left: 40%
text-align: center
font-size: 1em
background-color: rgba(0,0,0,0.4)
box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
border-radius: 50px
pointer-events: none
color: "#FFFFFF"
- type: custom:config-template-card
entities:
- sensor.p1s_01p00c5b2502053_ams_1_tray_3
element:
type: state-icon
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_3
icon: >-
${states['sensor.p1s_01p00c5b2502053_ams_1_tray_3'].state.toLowerCase()
!= 'empty' ? 'phu:3d-filament' : 'mdi:tray' }
style:
top: 28%
left: 59.7%
"--paper-item-icon-color": var(--tray_3_color)
background-color: rgba(0,0,0,0.5)
box-shadow: 0 0 5px 5px var(--tray_3_bg)
border-radius: 50px
"--mdc-icon-size": 2.4em
- type: state-label
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_3
attribute: type
tap_action:
action: none
style:
top: 77%
left: 60%
text-align: center
font-size: 1em
background-color: rgba(0,0,0,0.4)
box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
border-radius: 50px
pointer-events: none
color: "#FFFFFF"
- type: custom:config-template-card
entities:
- sensor.p1s_01p00c5b2502053_ams_1_tray_4
element:
type: state-icon
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_4
icon: >-
${states['sensor.p1s_01p00c5b2502053_ams_1_tray_4'].state.toLowerCase()
!= 'empty' ? 'phu:3d-filament' : 'mdi:tray' }
style:
top: 28%
left: 79.6%
"--paper-item-icon-color": var(--tray_4_color)
background-color: rgba(0,0,0,0.5)
box-shadow: 0 0 5px 5px var(--tray_4_bg)
border-radius: 50px
"--mdc-icon-size": 2.4em
- type: state-label
entity: sensor.p1s_01p00c5b2502053_ams_1_tray_4
attribute: type
tap_action:
action: none
style:
top: 77%
left: 79.6%
text-align: center
font-size: 1em
background-color: rgba(0,0,0,0.4)
box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
border-radius: 50px
pointer-events: none
color: "#FFFFFF"
- type: conditional
conditions:
- entity: sensor.p1s_01p00c5b2502053_printstatus
state_not: offline
elements:
- type: conditional
conditions:
- entity: sensor.p1s_01p00c5b2502053_ams_1_temperatuur
state_not:
- unavailable
- unknown
elements:
- entity: sensor.p1s_01p00c5b2502053_ams_1_temperatuur
type: state-badge
style:
top: 50.75%
left: 8%
font-size: 0.75em
color: rgba(0,0,0,0)
- type: custom:config-template-card
entities:
- sensor.p1s_01p00c5b2502053_ams_1_luchtvochtigheidsindex
element:
type: state-icon
entity: sensor.p1s_01p00c5b2502053_ams_1_luchtvochtigheidsindex
icon: >-
${'mdi:water-percent' +
states['sensor.p1s_01p00c5b2502053_ams_1_luchtvochtigheidsindex'].state
+ '#FFFFFF'}
style:
top: 38.5%
left: 92.5%
background-color: "#1c1c1c"
border-radius: 50px
border: 0.12em solid var(--humidity-border-color)
"--mdc-icon-size": 2.05em
image: /local/media/AMS_2.png
card_mod:
style: |
ha-card {
background: none !important;
border: none !important;
box-shadow: none !important;
--humidity-border-color: {% if states('sensor.p1s_01p00c5b2502053_ams_1_luchtvochtigheidsindex') != 'unavailable' and states('sensor.p1s_01p00c5b2502053_ams_1_luchtvochtigheidsindex') | int > 3 %} rgba(255, 255, 126, 0.5); {% elif states('sensor.p1s_01p00c5b2502053_ams_1_luchtvochtigheidsindex') != 'unavailable' and states('sensor.p1s_01p00c5b2502053_ams_1_luchtvochtigheidsindex') | int > 1 %} rgba(228,127,97,1.0); {% else %} rgba(194,74,72,1.0); {% endif %}
--tray_1_color: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_1', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_1', 'color') }}; {% endif %}
--tray_2_color: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_2', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_2', 'color') }}; {% endif %}
--tray_3_color: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_3', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_3', 'color') }}; {% endif %}
--tray_4_color: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_4', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_4', 'color') }}; {% endif %}
--tray_1_bg: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_1', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
--tray_2_bg: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_2', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
--tray_3_bg: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_3', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
--tray_4_bg: {% if is_state_attr('sensor.p1s_01p00c5b2502053_ams_1_tray_4', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
} |