@@ -113,6 +113,12 @@ pub struct EndpointLink {
113
113
pub ieee_address : IeeeAddress ,
114
114
}
115
115
116
+ #[ derive( Debug , Serialize , Deserialize , Clone ) ]
117
+ #[ serde( deny_unknown_fields) ]
118
+ pub struct GroupLink {
119
+ pub id : u32 ,
120
+ }
121
+
116
122
#[ derive( Debug , Serialize , Deserialize , Clone ) ]
117
123
#[ serde( deny_unknown_fields) ]
118
124
pub struct Scene {
@@ -150,6 +156,7 @@ pub struct BridgeConfigSchema {
150
156
#[ serde( deny_unknown_fields) ]
151
157
pub struct Config {
152
158
pub advanced : ConfigAdvanced ,
159
+ pub availability : Value ,
153
160
pub blocklist : Vec < Option < Value > > ,
154
161
pub device_options : ConfigDeviceOptions ,
155
162
pub devices : HashMap < String , Value > ,
@@ -175,15 +182,17 @@ pub struct Version {
175
182
#[ serde( deny_unknown_fields) ]
176
183
pub struct Network {
177
184
pub channel : i64 ,
178
- pub extended_pan_id : f64 ,
185
+ pub extended_pan_id : String ,
179
186
pub pan_id : i64 ,
180
187
}
181
188
182
189
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
183
190
#[ serde( deny_unknown_fields) ]
184
191
pub struct Coordinator {
185
192
pub ieee_address : IeeeAddress ,
186
- pub meta : CoordinatorMeta ,
193
+ /* stict parsing disabled for now, format too volatile between versions */
194
+ /* pub meta: CoordinatorMeta, */
195
+ pub meta : Value ,
187
196
#[ serde( rename = "type" ) ]
188
197
pub coordinator_type : String ,
189
198
}
@@ -238,7 +247,7 @@ pub struct CoordinatorMeta {
238
247
239
248
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
240
249
pub struct ConfigSerial {
241
- pub adapter : String ,
250
+ pub adapter : Option < String > ,
242
251
pub disable_led : bool ,
243
252
pub port : String ,
244
253
}
@@ -303,7 +312,7 @@ pub struct Device {
303
312
#[ serde( default ) ]
304
313
pub power_source : PowerSource ,
305
314
pub software_build_id : Option < String > ,
306
- pub supported : bool ,
315
+ pub supported : Option < bool > ,
307
316
#[ serde( rename = "type" ) ]
308
317
pub device_type : String ,
309
318
}
@@ -357,6 +366,7 @@ pub enum Expose {
357
366
Enum ( ExposeEnum ) ,
358
367
Light ( ExposeLight ) ,
359
368
List ( Value ) ,
369
+ Lock ( ExposeLock ) ,
360
370
Numeric ( ExposeNumeric ) ,
361
371
Switch ( ExposeSwitch ) ,
362
372
}
@@ -369,7 +379,7 @@ impl Expose {
369
379
Self :: Composite ( obj) => Some ( obj. name . as_str ( ) ) ,
370
380
Self :: Enum ( obj) => Some ( obj. name . as_str ( ) ) ,
371
381
Self :: Numeric ( obj) => Some ( obj. name . as_str ( ) ) ,
372
- Self :: Light ( _) | Self :: List ( _) | Self :: Switch ( _) => None ,
382
+ Self :: Light ( _) | Self :: List ( _) | Self :: Switch ( _) | Self :: Lock ( _ ) => None ,
373
383
}
374
384
}
375
385
}
@@ -421,6 +431,12 @@ pub struct ExposeLight {
421
431
pub features : Vec < Expose > ,
422
432
}
423
433
434
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
435
+ pub struct ExposeLock {
436
+ pub features : Vec < Expose > ,
437
+ pub label : String ,
438
+ }
439
+
424
440
impl ExposeLight {
425
441
#[ must_use]
426
442
pub fn feature ( & self , name : & str ) -> Option < & Expose > {
@@ -442,8 +458,9 @@ pub struct ExposeNumeric {
442
458
443
459
pub unit : Option < String > ,
444
460
pub category : Option < String > ,
445
- pub value_max : Option < i32 > ,
446
- pub value_min : Option < i32 > ,
461
+ pub value_max : Option < f64 > ,
462
+ pub value_min : Option < f64 > ,
463
+ pub value_step : Option < f64 > ,
447
464
448
465
#[ serde( default ) ]
449
466
pub presets : Vec < Preset > ,
@@ -485,7 +502,8 @@ pub struct ConfiguredReporting {
485
502
pub cluster : String ,
486
503
pub maximum_report_interval : i32 ,
487
504
pub minimum_report_interval : i32 ,
488
- pub reportable_change : i32 ,
505
+ #[ serde( default ) ]
506
+ pub reportable_change : Value ,
489
507
}
490
508
491
509
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
@@ -506,6 +524,7 @@ pub struct Binding {
506
524
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
507
525
#[ serde( tag = "type" , rename_all = "lowercase" ) ]
508
526
pub enum BindingTarget {
527
+ Group ( GroupLink ) ,
509
528
Endpoint ( EndpointLink ) ,
510
529
}
511
530
0 commit comments