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
| uid: LightControl
tags: []
props:
parameters:
- description: Header icon
label: Icon
name: iconHeader
required: false
type: TEXT
groupName: header
- description: Header text
label: Header
name: header
required: false
type: TEXT
groupName: header
- context: item
description: Item to control on/off
label: Item ON OFF
name: itemSwitch
required: true
type: TEXT
- context: item
description: Item to control brightness
label: Item brightness
name: itemBrightness
required: false
type: TEXT
- context: item
description: Item to control color temperature
label: Item light temperature
name: itemLightTemperature
required: false
type: TEXT
- context: item
description: Item to control color
label: Item light color
name: itemColor
required: false
type: TEXT
parameterGroups:
- name: header
description: Widget general settings
- name: setup
description: Widget specific settings
timestamp: Dec 24, 2022, 7:59:26 PM
component: f7-card
config:
style:
background-color: "=items[props.itemSwitch].state === 'ON' ? '#F8EFDA' : '#f2f2f2'"
border-radius: 15px
box-shadow: 0px 0px
margin: 5px 5px
slots:
content:
- component: f7-row
config:
style:
justify-content: left
slots:
default:
- component: oh-image
config:
url: ='/static/icons/' + props.iconHeader + '.svg'
style:
height: 25px
margin-right: 10px
visible: "=props.iconHeader ? true : false"
- component: Label
config:
text: "=props.header ? props.header : 'Set header title'"
style:
font-size: var(--f7-card-header-font-size)
font-weight: var(--f7-card-header-font-weight)
- component: oh-toggle
config:
item: =props.itemSwitch
style:
position: absolute
top: 18px
right: 18px
z-index: 100
--f7-toggle-active-color: "#F8BB00"
--f7-toggle-inactive-color: gray
- component: oh-link
config:
action: variable
actionVariable: visiblePart
actionVariableValue: "=vars.visiblePart === true ? false : true"
style:
position: absolute
top: 0
left: 0
height: 55px
width: 100%
actionPosition: center
- component: f7-row
config:
style:
justify-content: center
margin-top: 25px
visible: =vars.visiblePart === true && props.itemBrightness !== Null
slots:
default:
- component: oh-slider
config:
item: =props.itemBrightness
min: 0
max: 100
style:
width: calc(100% - 20px)
--f7-range-bar-size: 10px
--f7-range-bar-border-radius: 8px
--f7-range-knob-size: 20px
--f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
- component: f7-row
config:
style:
justify-content: center
margin-top: 10px
visible: =vars.visiblePart === true && props.itemLightTemperature !== Null
slots:
default:
- component: oh-slider
config:
item: =props.itemLightTemperature
min: 0
max: 100
style:
width: calc(100% - 20px)
--f7-range-bar-size: 10px
--f7-range-bar-border-radius: 10px
--f7-range-knob-size: 20px
--f7-range-bar-active-bg-color: transparent
--f7-range-bar-bg-color: linear-gradient(to right, rgba(215, 226, 255), rgba(224, 238, 238),rgba(255, 215, 44, 0.5),rgba(255, 215, 44, 0.8))
--f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
--f7-range-label-text-color: black
- component: f7-row
config:
style:
justify-content: center
margin-top: 10px
--f7-range-bar-size: 10px
--f7-range-bar-border-radius: 10px
--f7-range-knob-size: 20px
--f7-range-bar-active-bg-color: transparent
--f7-range-bar-bg-color: linear-gradient(to right, rgba(246,158,81,0.8), rgba(246,158,81,0))
--f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
--f7-range-label-text-color: black
--f7-color-picker-slider-size: 10px
--f7-color-picker-slider-knob-size: 20px
width: 100%
visible: =vars.visiblePart === true && props.itemColor !== Null
slots:
default:
- component: oh-colorpicker
config:
color: red
label: true
item: =props.itemColor
modules:
- hsb-sliders
- component: f7-row
config:
style:
justify-content: center
margin-top: 10px
visible: =vars.visiblePart === true && props.itemColor !== Null
slots:
default:
- component: oh-button
config:
iconColor: yellow
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 60,100,100
style:
padding: 0px 5px
height: 35px
background: transparent
- component: oh-button
config:
iconColor: orange
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 30,100,100
style:
padding: 0px 5px
height: 35px
background: transparent
- component: oh-button
config:
iconColor: deeporange
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 15,100,100
style:
padding: 0px 5px
height: 35px
background: transparent
- component: oh-button
config:
iconColor: red
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 0,100,100
style:
padding: 0px 5px
height: 35px
background: transparent
- component: oh-button
config:
iconColor: purple
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 300,100,100
style:
padding: 0px 5px
height: 35px
background: transparent
- component: oh-button
config:
iconColor: blue
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 240,100,100
style:
padding: 0px 5px
height: 35px
background: transparent
- component: oh-button
config:
iconColor: lightblue
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 180,100,100
style:
padding: 0px 5px
height: 35px
background: transparent
- component: oh-button
config:
iconColor: green
iconF7: app_fill
iconSize: 25
action: command
actionItem: =props.itemColor
actionCommand: 120,100,100
style:
padding: 0px 5px
height: 35px
background: transparent |