-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathmy_lovelace_card.yaml
228 lines (223 loc) · 7.08 KB
/
my_lovelace_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
type: custom:vertical-stack-in-card
cards:
# BANNER
- type: custom:banner-card
heading: [mdi:account-tie, Alfred]
link: centro_notifiche
card_mod:
style: |
ha-card {
overflow: hidden;
--bc-font-size-heading: 2em;
--bc-font-size-entity-value: 1em;
font-size: 1em;
--paper-icon-button: var(--paper-item-icon-active-color);
border-radius: var(--ha-card-border-radius) var(--ha-card-border-radius) 0px 0px;
background: content-box radial-gradient(var(--light-primary-color), var(--primary-color));
box-shadow: none;
}
# MARKDOWN SENSOR NOTIFIER APP CONDITIONAL
- type: conditional
conditions:
- entity: sensor.notifier_debug_error
state_not: "on"
- entity: sensor.notifier_debug_error
state_not: "OK"
card:
type: markdown
content: >-
<ha-alert title="Notifier Debug Error" alert-type="error">
{{states('sensor.notifier_debug_error')}}
</ha-alert>
# PAPER BUTTONS Row 1
- type: custom:paper-buttons-row
buttons:
- entity: binary_sensor.notifier_people_home
layout: icon
- entity: group.notifier_location_tracker
layout: icon
tap_action:
action: more-info
state_icons:
"not_home": "mdi:home-export-outline"
"home": "mdi:home-import-outline"
state_styles:
"not_home":
button:
color: var(--accent-color)
"home":
button:
color: var(--paper-item-icon-active-color)
- entity: input_boolean.notifier_phone_notifications
layout: icon
state_icons:
"off": "mdi:phone-off"
- entity: input_boolean.notifier_speech_notifications
layout: icon
state_icons:
"on": "mdi:account-tie-voice"
"off": "mdi:account-tie-voice-off"
- entity: input_boolean.notifier_text_notifications
layout: icon
state_icons:
"off": "mdi:cellphone-message-off"
- entity: input_boolean.notifier_screen_notifications
layout: icon
state_icons:
"off": "mdi:message-bulleted-off"
- entity: input_boolean.notifier_guest_mode
layout: icon
state_icons:
"on": "mdi:account-multiple-plus"
"off": "mdi:account-multiple-minus-outline"
- entity: input_boolean.notifier_priority_message
layout: icon
state_icons:
"off": "mdi:alarm-light-outline"
- entity: input_boolean.notifier_holidays
layout: icon
- entity: binary_sensor.notifier_dnd
layout: icon
state_icons:
"on": "mdi:minus-circle"
"off": "mdi:minus-circle-off"
- type: divider
style:
background-color: var(--primary-color)
height: 1px
# GLANCE
- type: glance
card_mod:
style: |
ha-card {
overflow: hidden; box-shadow: none; background: none;
border-radius: 0px; font-size: 0.9em;
}
columns: 3
show_icon: false
state_color: true
entities:
- entity: sensor.notifier_day_period
- entity: sensor.notifier_day_period_volume
- entity: input_select.notifier_language
- entity: select.notifier_player_alexa
- entity: select.notifier_player_google
- entity: input_select.notifier_text_notify
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.notifier_text_notify
hold_action:
action: call-service
service: input_select.select_previous
service_data:
entity_id: input_select.notifier_text_notify
double_tap_action:
action: more-info
- type: divider
style:
background-color: var(--primary-color)
height: 1px
# PAPER BUTTONS Row 2
- type: custom:paper-buttons-row
buttons:
- entity: input_boolean.notifier_google_switch
layout: icon|name
name: Google
- entity: input_select.notifier_tts_notify
layout: icon|state
icon: false
state_text:
"google say": "Say"
"google cloud": "Cloud"
"google assistant": "Assistant"
"reverso": "Reverso"
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.notifier_tts_notify
- entity: input_boolean.notifier_alexa_switch
layout: icon|name
name: Alexa
styles:
button:
- color: >-
{{ iif(is_state('binary_sensor.notifier_alexa_speak', 'on'),
'var(--accent-color)', '') }}
- animation: >-
{{ iif(is_state('binary_sensor.notifier_alexa_speak', 'on'),
'blink 1.5s linear infinite alternate', '') }}
- entity: input_select.notifier_alexa_type
layout: state
state:
case: first
state_styles:
"announce":
button:
color: var(--paper-item-icon-active-color)
tap_action:
action: call-service
service: input_select.select_next
service_data:
entity_id: input_select.notifier_alexa_type
- entity: input_boolean.notifier_alexa_ssml
layout: icon|name
name: SSML
# TEXT INPUT ROW
- type: divider
style:
background-color: var(--primary-color)
height: 1px
- type: entities
card_mod:
style: |
ha-card {
background:none; border-radius: 0px; box-shadow: none;
}
.card-content {
padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
}
entities:
- type: custom:fold-entity-row
cickable: true
padding: 0
head:
type: button
icon: mdi:bullhorn-outline
name: Interfono
action_name: Last Message
tap_action:
action: call-service
service: input_boolean.turn_on
service_data:
entity_id: input_boolean.notifier_last_message
entities:
- type: custom:lovelace-multiline-text-input-card
card_mod:
style: |
ha-card {
background:none; border-radius: 0px; box-shadow: none;
color: var(--primary-text-color);
}
textarea.textarea {margin-top: 0;}
.card-content {padding-top: 0;}
# autosave: true
entity: input_text.notifier_intercom_message
max_length: 255
min_length: 1
placeholder_text: "Messaggio da inviare..."
title: ""
buttons:
save: true
paste: true
clear: true
icons:
save: mdi:send
paste: mdi:content-paste
clear: mdi:delete-forever
- type: custom:slider-entity-row
entity: input_number.notifier_intercom_volume
name: hide_state
full_row: true