-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathConnection_Card_2.yaml
220 lines (220 loc) · 7.83 KB
/
Connection_Card_2.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
uid: Connection_Card_2
tags: []
props:
parameters:
- label: Header
name: text_header
required: false
type: TEXT
- description: icon name without ".png", located in static/icons/ folder
label: Icon
name: iconimage
required: false
type: TEXT
- description: HEX or rgba
label: Backgroundcolor
name: bgcolor
required: false
type: TEXT
- description: Page which will be opened as popup
label: Page ID
name: page
required: false
- context: item
description: select item for download
label: Item
name: download
required: false
type: TEXT
- context: item
description: select item for upload
label: Item
name: upload
required: false
type: TEXT
- context: item
description: select item for set latency
label: Item
name: latency
required: false
type: TEXT
timestamp: Nov 27, 2021, 3:12:47 PM
component: f7-card
config:
style:
background-color: "=props.bgcolor ? props.bgcolor : ''"
border-radius: var(--f7-card-expandable-border-radius)
box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
class:
- padding: 0px
height: 125px
margin-left: 5px
margin-right: 5px
noShadow: false
slots:
content:
- component: f7-block
config:
style:
left: 50px
position: absolute
top: -5px
slots:
default:
- component: Label
config:
style:
font-size: 17px
font-weight: 600
margin-left: 0px
margin-top: 0px
text: "=props.text_header ? props.text_header : 'Set Props'"
- component: f7-block
config:
style:
bottom: -37px
left: 16px
position: absolute
slots:
default:
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: "=(items[props.status].state === 'ON') ? 'lightbulb' : 'lightbulb_slash'"
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=(items[props.status].state === 'ON') ? items[props.status].state : ''"
visible: "=props.status ? true : false"
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: flame
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=items[props.heating].state === 'ON' ? '' : ''"
visible: =items[props.heating].state === 'ON'
- component: f7-chip
config:
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=items[props.motion].state === 'ON' ? '' : ''"
visible: "=props.motion ? true : false"
slots:
media:
- component: oh-icon
config:
icon: "=items[props.motion].state === 'ON' ? 'motion' : ''"
style:
filter: "='brightness(' + (themeOptions.dark === 'dark' ? '1' : '0.4') + ')'"
height: 18px
- component: f7-chip
config:
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=items[props.windows_numbers].state > 0 ? items[props.windows_numbers].state : ''"
visible: "=items[props.windows].state === 'OPEN' ? true : false"
slots:
media:
- component: oh-icon
config:
icon: window-open
style:
filter: "='brightness(' + (themeOptions.dark === 'dark' ? '1' : '0.4') + ')'"
height: 18px
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: "=items[props.door_lock].state === 'ON' ? 'lock_open' : 'lock'"
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=items[props.door_lock].state === 'ON' ? '' : ''"
visible: "=props.door_lock ? true : false"
- component: f7-chip
config:
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=(Number(items[props.blinds_closed].state) === 0) ? '' : Math.floor(items[props.blinds_closed].state) + '%'"
visible: "=(Number(Math.floor(items[props.blinds_closed].state)) > 0) ? true : false"
slots:
media:
- component: oh-icon
config:
icon: "=(Number(items[props.blinds_closed].state) === 0) ? 'cinemascreen-30' : 'cinemascreen-100'"
style:
filter: "='brightness(' + (themeOptions.dark === 'dark' ? '100' : '0.3') + ')'"
height: 18px
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: "=items[props.speakers].state === 'PLAY' ? 'speaker_2' : 'speaker'"
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
visible: "=items[props.speakers].state === 'PLAY' ? true : false"
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: sun_min
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: =items[props.illuminance].displayState
visible: "=props.illuminance ? true : false"
- component: f7-block
config:
style:
bottom: -65px
left: 16px
position: absolute
slots:
default:
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: download_circle_fill
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=(items[props.download].displayState ? items[props.download].displayState : items[props.download].state) "
visible: "=props.download ? true : false"
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: upload_circle_fill
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=(items[props.upload].displayState ? items[props.upload].displayState : items[props.upload].state) "
visible: "=props.upload ? true : false"
- component: f7-chip
config:
iconColor: "=themeOptions.dark === 'dark' ? 'white' : 'black'"
iconF7: timer_fill
iconSize: 18
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
text: "=(items[props.latency].displayState ? items[props.latency].displayState : items[props.latency].state) "
visible: "=props.latency ? true : false"
- component: oh-image
config:
style:
height: 25px
left: 16px
opacity: 0.7
position: absolute
top: 10px
url: ='/static/icons/' + props.iconimage + '.png'
visible: "=props.iconimage ? true : false"
- component: oh-link
config:
action: popup
actionModal: ='page:' + props.page
style:
height: 110px
left: 0px
position: absolute
top: 0px
width: 100%