zigbee2mqtt_types_vendor_aurora_lighting/
lib.rs

1use serde::Deserialize;
2use serde::de::Unexpected;
3use serde::de;
4use serde::Deserializer;
5use zigbee2mqtt_types_base_types::LastSeen;
6/// aurora_lighting:AU-A1GSZ9B/27 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1GSZ9B/27.html)
7///
8/// 
9#[cfg_attr(feature = "debug", derive(Debug))]
10#[cfg_attr(feature = "clone", derive(Clone))]
11#[derive(Deserialize)]
12pub struct ZigbeeAuDa1gsz9b27 {
13    ///Brightness of this light
14    pub brightness: f64,
15    ///Link quality (signal strength)
16    pub linkquality: f64,
17    ///Controls the behavior when the device is powered on after power loss
18    pub power_on_behavior: ZigbeeAuDa1gsz9b27Poweronbehavior,
19    ///Zigbee herdsman description: "On/off state of this light"
20    ///The string values get converted into boolean with: ON = true and OFF = false
21    #[serde(deserialize_with = "zigbeeauda1gsz9b27_state_deserializer")]
22    pub state: bool,
23    /// Optional last_seen type, set as a global zigbee2mqtt setting
24    pub last_seen: Option<LastSeen>,
25    /// Optional elapsed type
26    pub elapsed: Option<u64>,
27}
28/// Deserialize bool from String with custom value mapping
29fn zigbeeauda1gsz9b27_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
30where
31    D: Deserializer<'de>,
32{
33    match String::deserialize(deserializer)?.as_ref() {
34        "ON" => Ok(true),
35        "OFF" => Ok(false),
36        other => Err(de::Error::invalid_value(
37            Unexpected::Str(other),
38            &"Value expected was either ON or OFF",
39        )),
40    }
41}
42
43/// aurora_lighting:AU-A1GSZ9RGBW_HV-GSCXZB269K [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1GSZ9RGBW_HV-GSCXZB269K.html)
44///
45/// 
46#[cfg_attr(feature = "debug", derive(Debug))]
47#[cfg_attr(feature = "clone", derive(Clone))]
48#[derive(Deserialize)]
49pub struct ZigbeeAuDa1gsz9rgbwUhvDgscxzb269k {
50    ///Brightness of this light
51    pub brightness: f64,
52    ///Color temperature of this light
53    pub color_temp: f64,
54    ///Color temperature after cold power on of this light
55    pub color_temp_startup: f64,
56    ///Link quality (signal strength)
57    pub linkquality: f64,
58    ///Controls the behavior when the device is powered on after power loss
59    pub power_on_behavior: ZigbeeAuDa1gsz9rgbwUhvDgscxzb269kPoweronbehavior,
60    ///Zigbee herdsman description: "On/off state of this light"
61    ///The string values get converted into boolean with: ON = true and OFF = false
62    #[serde(deserialize_with = "zigbeeauda1gsz9rgbwuhvdgscxzb269k_state_deserializer")]
63    pub state: bool,
64    /// Optional last_seen type, set as a global zigbee2mqtt setting
65    pub last_seen: Option<LastSeen>,
66    /// Optional elapsed type
67    pub elapsed: Option<u64>,
68}
69/// Deserialize bool from String with custom value mapping
70fn zigbeeauda1gsz9rgbwuhvdgscxzb269k_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
71where
72    D: Deserializer<'de>,
73{
74    match String::deserialize(deserializer)?.as_ref() {
75        "ON" => Ok(true),
76        "OFF" => Ok(false),
77        other => Err(de::Error::invalid_value(
78            Unexpected::Str(other),
79            &"Value expected was either ON or OFF",
80        )),
81    }
82}
83
84/// aurora_lighting:AU-A1GUZB5/30 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1GUZB5/30.html)
85///
86/// 
87#[cfg_attr(feature = "debug", derive(Debug))]
88#[cfg_attr(feature = "clone", derive(Clone))]
89#[derive(Deserialize)]
90pub struct ZigbeeAuDa1guzb530 {
91    ///Brightness of this light
92    pub brightness: f64,
93    ///Link quality (signal strength)
94    pub linkquality: f64,
95    ///Controls the behavior when the device is powered on after power loss
96    pub power_on_behavior: ZigbeeAuDa1guzb530Poweronbehavior,
97    ///Zigbee herdsman description: "On/off state of this light"
98    ///The string values get converted into boolean with: ON = true and OFF = false
99    #[serde(deserialize_with = "zigbeeauda1guzb530_state_deserializer")]
100    pub state: bool,
101    /// Optional last_seen type, set as a global zigbee2mqtt setting
102    pub last_seen: Option<LastSeen>,
103    /// Optional elapsed type
104    pub elapsed: Option<u64>,
105}
106/// Deserialize bool from String with custom value mapping
107fn zigbeeauda1guzb530_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
108where
109    D: Deserializer<'de>,
110{
111    match String::deserialize(deserializer)?.as_ref() {
112        "ON" => Ok(true),
113        "OFF" => Ok(false),
114        other => Err(de::Error::invalid_value(
115            Unexpected::Str(other),
116            &"Value expected was either ON or OFF",
117        )),
118    }
119}
120
121/// aurora_lighting:AU-A1GUZBCX5 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1GUZBCX5.html)
122///
123/// 
124#[cfg_attr(feature = "debug", derive(Debug))]
125#[cfg_attr(feature = "clone", derive(Clone))]
126#[derive(Deserialize)]
127pub struct ZigbeeAuDa1guzbcx5 {
128    ///Brightness of this light
129    pub brightness: f64,
130    ///Color temperature of this light
131    pub color_temp: f64,
132    ///Color temperature after cold power on of this light
133    pub color_temp_startup: f64,
134    ///Link quality (signal strength)
135    pub linkquality: f64,
136    ///Controls the behavior when the device is powered on after power loss
137    pub power_on_behavior: ZigbeeAuDa1guzbcx5Poweronbehavior,
138    ///Zigbee herdsman description: "On/off state of this light"
139    ///The string values get converted into boolean with: ON = true and OFF = false
140    #[serde(deserialize_with = "zigbeeauda1guzbcx5_state_deserializer")]
141    pub state: bool,
142    /// Optional last_seen type, set as a global zigbee2mqtt setting
143    pub last_seen: Option<LastSeen>,
144    /// Optional elapsed type
145    pub elapsed: Option<u64>,
146}
147/// Deserialize bool from String with custom value mapping
148fn zigbeeauda1guzbcx5_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
149where
150    D: Deserializer<'de>,
151{
152    match String::deserialize(deserializer)?.as_ref() {
153        "ON" => Ok(true),
154        "OFF" => Ok(false),
155        other => Err(de::Error::invalid_value(
156            Unexpected::Str(other),
157            &"Value expected was either ON or OFF",
158        )),
159    }
160}
161
162/// aurora_lighting:AU-A1GUZBRGBW [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1GUZBRGBW.html)
163///
164/// 
165#[cfg_attr(feature = "debug", derive(Debug))]
166#[cfg_attr(feature = "clone", derive(Clone))]
167#[derive(Deserialize)]
168pub struct ZigbeeAuDa1guzbrgbw {
169    ///Brightness of this light
170    pub brightness: f64,
171    ///Color temperature of this light
172    pub color_temp: f64,
173    ///Color temperature after cold power on of this light
174    pub color_temp_startup: f64,
175    ///Link quality (signal strength)
176    pub linkquality: f64,
177    ///Controls the behavior when the device is powered on after power loss
178    pub power_on_behavior: ZigbeeAuDa1guzbrgbwPoweronbehavior,
179    ///Zigbee herdsman description: "On/off state of this light"
180    ///The string values get converted into boolean with: ON = true and OFF = false
181    #[serde(deserialize_with = "zigbeeauda1guzbrgbw_state_deserializer")]
182    pub state: bool,
183    /// Optional last_seen type, set as a global zigbee2mqtt setting
184    pub last_seen: Option<LastSeen>,
185    /// Optional elapsed type
186    pub elapsed: Option<u64>,
187}
188/// Deserialize bool from String with custom value mapping
189fn zigbeeauda1guzbrgbw_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
190where
191    D: Deserializer<'de>,
192{
193    match String::deserialize(deserializer)?.as_ref() {
194        "ON" => Ok(true),
195        "OFF" => Ok(false),
196        other => Err(de::Error::invalid_value(
197            Unexpected::Str(other),
198            &"Value expected was either ON or OFF",
199        )),
200    }
201}
202
203/// aurora_lighting:AU-A1VG125Z5E/19 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1VG125Z5E/19.html)
204///
205/// 
206#[cfg_attr(feature = "debug", derive(Debug))]
207#[cfg_attr(feature = "clone", derive(Clone))]
208#[derive(Deserialize)]
209pub struct ZigbeeAuDa1vg125z5e19 {
210    ///Brightness of this light
211    pub brightness: f64,
212    ///Link quality (signal strength)
213    pub linkquality: f64,
214    ///Controls the behavior when the device is powered on after power loss
215    pub power_on_behavior: ZigbeeAuDa1vg125z5e19Poweronbehavior,
216    ///Zigbee herdsman description: "On/off state of this light"
217    ///The string values get converted into boolean with: ON = true and OFF = false
218    #[serde(deserialize_with = "zigbeeauda1vg125z5e19_state_deserializer")]
219    pub state: bool,
220    /// Optional last_seen type, set as a global zigbee2mqtt setting
221    pub last_seen: Option<LastSeen>,
222    /// Optional elapsed type
223    pub elapsed: Option<u64>,
224}
225/// Deserialize bool from String with custom value mapping
226fn zigbeeauda1vg125z5e19_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
227where
228    D: Deserializer<'de>,
229{
230    match String::deserialize(deserializer)?.as_ref() {
231        "ON" => Ok(true),
232        "OFF" => Ok(false),
233        other => Err(de::Error::invalid_value(
234            Unexpected::Str(other),
235            &"Value expected was either ON or OFF",
236        )),
237    }
238}
239
240/// aurora_lighting:AU-A1VGSZ5E/19 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1VGSZ5E/19.html)
241///
242/// 
243#[cfg_attr(feature = "debug", derive(Debug))]
244#[cfg_attr(feature = "clone", derive(Clone))]
245#[derive(Deserialize)]
246pub struct ZigbeeAuDa1vgsz5e19 {
247    ///Brightness of this light
248    pub brightness: f64,
249    ///Link quality (signal strength)
250    pub linkquality: f64,
251    ///Controls the behavior when the device is powered on after power loss
252    pub power_on_behavior: ZigbeeAuDa1vgsz5e19Poweronbehavior,
253    ///Zigbee herdsman description: "On/off state of this light"
254    ///The string values get converted into boolean with: ON = true and OFF = false
255    #[serde(deserialize_with = "zigbeeauda1vgsz5e19_state_deserializer")]
256    pub state: bool,
257    /// Optional last_seen type, set as a global zigbee2mqtt setting
258    pub last_seen: Option<LastSeen>,
259    /// Optional elapsed type
260    pub elapsed: Option<u64>,
261}
262/// Deserialize bool from String with custom value mapping
263fn zigbeeauda1vgsz5e19_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
264where
265    D: Deserializer<'de>,
266{
267    match String::deserialize(deserializer)?.as_ref() {
268        "ON" => Ok(true),
269        "OFF" => Ok(false),
270        other => Err(de::Error::invalid_value(
271            Unexpected::Str(other),
272            &"Value expected was either ON or OFF",
273        )),
274    }
275}
276
277/// aurora_lighting:AU-A1ZB2WDM [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZB2WDM.html)
278///
279/// 
280#[cfg_attr(feature = "debug", derive(Debug))]
281#[cfg_attr(feature = "clone", derive(Clone))]
282#[derive(Deserialize)]
283pub struct ZigbeeAuDa1zb2wdm {
284    ///Zigbee herdsman description: "Enable or disable the blue backlight LED"
285    ///The string values get converted into boolean with: ON = true and OFF = false
286    #[serde(deserialize_with = "zigbeeauda1zb2wdm_backlight_led_deserializer")]
287    pub backlight_led: bool,
288    ///Brightness of this light
289    pub brightness: f64,
290    ///Link quality (signal strength)
291    pub linkquality: f64,
292    ///Controls the behavior when the device is powered on after power loss
293    pub power_on_behavior: ZigbeeAuDa1zb2wdmPoweronbehavior,
294    ///Zigbee herdsman description: "On/off state of this light"
295    ///The string values get converted into boolean with: ON = true and OFF = false
296    #[serde(deserialize_with = "zigbeeauda1zb2wdm_state_deserializer")]
297    pub state: bool,
298    /// Optional last_seen type, set as a global zigbee2mqtt setting
299    pub last_seen: Option<LastSeen>,
300    /// Optional elapsed type
301    pub elapsed: Option<u64>,
302}
303/// Deserialize bool from String with custom value mapping
304fn zigbeeauda1zb2wdm_backlight_led_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
305where
306    D: Deserializer<'de>,
307{
308    match String::deserialize(deserializer)?.as_ref() {
309        "ON" => Ok(true),
310        "OFF" => Ok(false),
311        other => Err(de::Error::invalid_value(
312            Unexpected::Str(other),
313            &"Value expected was either ON or OFF",
314        )),
315    }
316}
317
318
319/// Deserialize bool from String with custom value mapping
320fn zigbeeauda1zb2wdm_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
321where
322    D: Deserializer<'de>,
323{
324    match String::deserialize(deserializer)?.as_ref() {
325        "ON" => Ok(true),
326        "OFF" => Ok(false),
327        other => Err(de::Error::invalid_value(
328            Unexpected::Str(other),
329            &"Value expected was either ON or OFF",
330        )),
331    }
332}
333
334/// aurora_lighting:AU-A1ZBDSS [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBDSS.html)
335///
336/// 
337#[cfg_attr(feature = "debug", derive(Debug))]
338#[cfg_attr(feature = "clone", derive(Clone))]
339#[derive(Deserialize)]
340pub struct ZigbeeAuDa1zbdss {
341    ///Brightness of this backlight LED
342    pub brightness: f64,
343    ///Link quality (signal strength)
344    pub linkquality: f64,
345    ///Instantaneous measured power
346    pub power_left: f64,
347    ///Instantaneous measured power
348    pub power_right: f64,
349    ///Zigbee herdsman description: "On/off state of the switch"
350    ///The string values get converted into boolean with: ON = true and OFF = false
351    #[serde(deserialize_with = "zigbeeauda1zbdss_state_left_deserializer")]
352    pub state_left: bool,
353    ///Zigbee herdsman description: "On/off state of the switch"
354    ///The string values get converted into boolean with: ON = true and OFF = false
355    #[serde(deserialize_with = "zigbeeauda1zbdss_state_right_deserializer")]
356    pub state_right: bool,
357    /// Optional last_seen type, set as a global zigbee2mqtt setting
358    pub last_seen: Option<LastSeen>,
359    /// Optional elapsed type
360    pub elapsed: Option<u64>,
361}
362/// Deserialize bool from String with custom value mapping
363fn zigbeeauda1zbdss_state_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
364where
365    D: Deserializer<'de>,
366{
367    match String::deserialize(deserializer)?.as_ref() {
368        "ON" => Ok(true),
369        "OFF" => Ok(false),
370        other => Err(de::Error::invalid_value(
371            Unexpected::Str(other),
372            &"Value expected was either ON or OFF",
373        )),
374    }
375}
376
377
378/// Deserialize bool from String with custom value mapping
379fn zigbeeauda1zbdss_state_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
380where
381    D: Deserializer<'de>,
382{
383    match String::deserialize(deserializer)?.as_ref() {
384        "ON" => Ok(true),
385        "OFF" => Ok(false),
386        other => Err(de::Error::invalid_value(
387            Unexpected::Str(other),
388            &"Value expected was either ON or OFF",
389        )),
390    }
391}
392
393/// aurora_lighting:AU-A1ZBDWS [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBDWS.html)
394///
395/// 
396#[cfg_attr(feature = "debug", derive(Debug))]
397#[cfg_attr(feature = "clone", derive(Clone))]
398#[derive(Deserialize)]
399pub struct ZigbeeAuDa1zbdws {
400    ///Remaining battery in %, can take up to 24 hours before reported.
401    pub battery: f64,
402    ///Zigbee herdsman description: "Indicates if the battery of this device is almost empty"
403    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
404    pub battery_low: bool,
405    ///Zigbee herdsman description: "Indicates if the contact is closed (= true) or open (= false)"
406    ///Boolean values can be an unintuitive way round: value_on = false and value_off = true, consider double checking Zigbee2MQTT to understand what they mean
407    pub contact: bool,
408    ///Link quality (signal strength)
409    pub linkquality: f64,
410    ///Zigbee herdsman description: "Indicates whether the device is tampered"
411    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
412    pub tamper: bool,
413    /// Optional last_seen type, set as a global zigbee2mqtt setting
414    pub last_seen: Option<LastSeen>,
415    /// Optional elapsed type
416    pub elapsed: Option<u64>,
417}/// aurora_lighting:AU-A1ZBMPRO1ZX [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBMPRO1ZX.html)
418///
419/// 
420#[cfg_attr(feature = "debug", derive(Debug))]
421#[cfg_attr(feature = "clone", derive(Clone))]
422#[derive(Deserialize)]
423pub struct ZigbeeAuDa1zbmpro1zx {
424    ///Brightness of this light
425    pub brightness: f64,
426    ///Color temperature of this light
427    pub color_temp: f64,
428    ///Color temperature after cold power on of this light
429    pub color_temp_startup: f64,
430    ///Link quality (signal strength)
431    pub linkquality: f64,
432    ///Controls the behavior when the device is powered on after power loss
433    pub power_on_behavior: ZigbeeAuDa1zbmpro1zxPoweronbehavior,
434    ///Zigbee herdsman description: "On/off state of this light"
435    ///The string values get converted into boolean with: ON = true and OFF = false
436    #[serde(deserialize_with = "zigbeeauda1zbmpro1zx_state_deserializer")]
437    pub state: bool,
438    /// Optional last_seen type, set as a global zigbee2mqtt setting
439    pub last_seen: Option<LastSeen>,
440    /// Optional elapsed type
441    pub elapsed: Option<u64>,
442}
443/// Deserialize bool from String with custom value mapping
444fn zigbeeauda1zbmpro1zx_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
445where
446    D: Deserializer<'de>,
447{
448    match String::deserialize(deserializer)?.as_ref() {
449        "ON" => Ok(true),
450        "OFF" => Ok(false),
451        other => Err(de::Error::invalid_value(
452            Unexpected::Str(other),
453            &"Value expected was either ON or OFF",
454        )),
455    }
456}
457
458/// aurora_lighting:AU-A1ZBPIA [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBPIA.html)
459///
460/// 
461#[cfg_attr(feature = "debug", derive(Debug))]
462#[cfg_attr(feature = "clone", derive(Clone))]
463#[derive(Deserialize)]
464pub struct ZigbeeAuDa1zbpia {
465    ///Instantaneous measured electrical current
466    pub current: f64,
467    ///Temperature of the device
468    pub device_temperature: f64,
469    ///Sum of consumed energy
470    pub energy: f64,
471    ///Link quality (signal strength)
472    pub linkquality: f64,
473    ///Instantaneous measured power
474    pub power: f64,
475    ///Zigbee herdsman description: "On/off state of the switch"
476    ///The string values get converted into boolean with: ON = true and OFF = false
477    #[serde(deserialize_with = "zigbeeauda1zbpia_state_deserializer")]
478    pub state: bool,
479    ///Measured electrical potential value
480    pub voltage: f64,
481    /// Optional last_seen type, set as a global zigbee2mqtt setting
482    pub last_seen: Option<LastSeen>,
483    /// Optional elapsed type
484    pub elapsed: Option<u64>,
485}
486/// Deserialize bool from String with custom value mapping
487fn zigbeeauda1zbpia_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
488where
489    D: Deserializer<'de>,
490{
491    match String::deserialize(deserializer)?.as_ref() {
492        "ON" => Ok(true),
493        "OFF" => Ok(false),
494        other => Err(de::Error::invalid_value(
495            Unexpected::Str(other),
496            &"Value expected was either ON or OFF",
497        )),
498    }
499}
500
501/// aurora_lighting:AU-A1ZBPIAB [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBPIAB.html)
502///
503/// 
504#[cfg_attr(feature = "debug", derive(Debug))]
505#[cfg_attr(feature = "clone", derive(Clone))]
506#[derive(Deserialize)]
507pub struct ZigbeeAuDa1zbpiab {
508    ///Instantaneous measured electrical current
509    pub current: f64,
510    ///Link quality (signal strength)
511    pub linkquality: f64,
512    ///Instantaneous measured power
513    pub power: f64,
514    ///Zigbee herdsman description: "On/off state of the switch"
515    ///The string values get converted into boolean with: ON = true and OFF = false
516    #[serde(deserialize_with = "zigbeeauda1zbpiab_state_deserializer")]
517    pub state: bool,
518    ///Measured electrical potential value
519    pub voltage: f64,
520    /// Optional last_seen type, set as a global zigbee2mqtt setting
521    pub last_seen: Option<LastSeen>,
522    /// Optional elapsed type
523    pub elapsed: Option<u64>,
524}
525/// Deserialize bool from String with custom value mapping
526fn zigbeeauda1zbpiab_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
527where
528    D: Deserializer<'de>,
529{
530    match String::deserialize(deserializer)?.as_ref() {
531        "ON" => Ok(true),
532        "OFF" => Ok(false),
533        other => Err(de::Error::invalid_value(
534            Unexpected::Str(other),
535            &"Value expected was either ON or OFF",
536        )),
537    }
538}
539
540/// aurora_lighting:AU-A1ZBPIRS [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBPIRS.html)
541///
542/// 
543#[cfg_attr(feature = "debug", derive(Debug))]
544#[cfg_attr(feature = "clone", derive(Clone))]
545#[derive(Deserialize)]
546pub struct ZigbeeAuDa1zbpirs {
547    ///Zigbee herdsman description: "Indicates if the battery of this device is almost empty"
548    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
549    pub battery_low: bool,
550    ///Raw measured illuminance
551    pub illuminance: f64,
552    ///Measured illuminance in lux
553    pub illuminance_lux: f64,
554    ///Link quality (signal strength)
555    pub linkquality: f64,
556    ///Zigbee herdsman description: "Indicates whether the device detected occupancy"
557    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
558    pub occupancy: bool,
559    ///Zigbee herdsman description: "Indicates whether the device is tampered"
560    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
561    pub tamper: bool,
562    /// Optional last_seen type, set as a global zigbee2mqtt setting
563    pub last_seen: Option<LastSeen>,
564    /// Optional elapsed type
565    pub elapsed: Option<u64>,
566}/// aurora_lighting:AU-A1ZBR1GW [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBR1GW.html)
567///
568/// 
569#[cfg_attr(feature = "debug", derive(Debug))]
570#[cfg_attr(feature = "clone", derive(Clone))]
571#[derive(Deserialize)]
572pub struct ZigbeeAuDa1zbr1gw {
573    ///Triggered action (e.g. a button click)
574    pub action: ZigbeeAuDa1zbr1gwAction,
575    ///Remaining battery in %, can take up to 24 hours before reported.
576    pub battery: f64,
577    ///Link quality (signal strength)
578    pub linkquality: f64,
579    /// Optional last_seen type, set as a global zigbee2mqtt setting
580    pub last_seen: Option<LastSeen>,
581    /// Optional elapsed type
582    pub elapsed: Option<u64>,
583}/// aurora_lighting:AU-A1ZBR2GW [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBR2GW.html)
584///
585/// 
586#[cfg_attr(feature = "debug", derive(Debug))]
587#[cfg_attr(feature = "clone", derive(Clone))]
588#[derive(Deserialize)]
589pub struct ZigbeeAuDa1zbr2gw {
590    ///Triggered action (e.g. a button click)
591    pub action: ZigbeeAuDa1zbr2gwAction,
592    ///Remaining battery in %, can take up to 24 hours before reported.
593    pub battery: f64,
594    ///Link quality (signal strength)
595    pub linkquality: f64,
596    /// Optional last_seen type, set as a global zigbee2mqtt setting
597    pub last_seen: Option<LastSeen>,
598    /// Optional elapsed type
599    pub elapsed: Option<u64>,
600}/// aurora_lighting:AU-A1ZBRC [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/AU-A1ZBRC.html)
601///
602/// 
603#[cfg_attr(feature = "debug", derive(Debug))]
604#[cfg_attr(feature = "clone", derive(Clone))]
605#[derive(Deserialize)]
606pub struct ZigbeeAuDa1zbrc {
607    ///Triggered action (e.g. a button click)
608    pub action: ZigbeeAuDa1zbrcAction,
609    ///Remaining battery in %, can take up to 24 hours before reported.
610    pub battery: f64,
611    ///Link quality (signal strength)
612    pub linkquality: f64,
613    /// Optional last_seen type, set as a global zigbee2mqtt setting
614    pub last_seen: Option<LastSeen>,
615    /// Optional elapsed type
616    pub elapsed: Option<u64>,
617}
618#[cfg_attr(feature = "debug", derive(Debug))]
619#[cfg_attr(feature = "clone", derive(Clone))]
620#[derive(Deserialize, PartialEq)]
621pub enum ZigbeeAuDa1gsz9b27Poweronbehavior {
622    #[serde(rename = "off")]
623    Off,
624    #[serde(rename = "on")]
625    On,
626    #[serde(rename = "previous")]
627    Previous,
628    #[serde(rename = "toggle")]
629    Toggle,
630}
631#[cfg_attr(feature = "debug", derive(Debug))]
632#[cfg_attr(feature = "clone", derive(Clone))]
633#[derive(Deserialize, PartialEq)]
634pub enum ZigbeeAuDa1gsz9rgbwUhvDgscxzb269kPoweronbehavior {
635    #[serde(rename = "off")]
636    Off,
637    #[serde(rename = "on")]
638    On,
639    #[serde(rename = "previous")]
640    Previous,
641    #[serde(rename = "toggle")]
642    Toggle,
643}
644#[cfg_attr(feature = "debug", derive(Debug))]
645#[cfg_attr(feature = "clone", derive(Clone))]
646#[derive(Deserialize, PartialEq)]
647pub enum ZigbeeAuDa1guzb530Poweronbehavior {
648    #[serde(rename = "off")]
649    Off,
650    #[serde(rename = "on")]
651    On,
652    #[serde(rename = "previous")]
653    Previous,
654    #[serde(rename = "toggle")]
655    Toggle,
656}
657#[cfg_attr(feature = "debug", derive(Debug))]
658#[cfg_attr(feature = "clone", derive(Clone))]
659#[derive(Deserialize, PartialEq)]
660pub enum ZigbeeAuDa1guzbcx5Poweronbehavior {
661    #[serde(rename = "off")]
662    Off,
663    #[serde(rename = "on")]
664    On,
665    #[serde(rename = "previous")]
666    Previous,
667    #[serde(rename = "toggle")]
668    Toggle,
669}
670#[cfg_attr(feature = "debug", derive(Debug))]
671#[cfg_attr(feature = "clone", derive(Clone))]
672#[derive(Deserialize, PartialEq)]
673pub enum ZigbeeAuDa1guzbrgbwPoweronbehavior {
674    #[serde(rename = "off")]
675    Off,
676    #[serde(rename = "on")]
677    On,
678    #[serde(rename = "previous")]
679    Previous,
680    #[serde(rename = "toggle")]
681    Toggle,
682}
683#[cfg_attr(feature = "debug", derive(Debug))]
684#[cfg_attr(feature = "clone", derive(Clone))]
685#[derive(Deserialize, PartialEq)]
686pub enum ZigbeeAuDa1vg125z5e19Poweronbehavior {
687    #[serde(rename = "off")]
688    Off,
689    #[serde(rename = "on")]
690    On,
691    #[serde(rename = "previous")]
692    Previous,
693    #[serde(rename = "toggle")]
694    Toggle,
695}
696#[cfg_attr(feature = "debug", derive(Debug))]
697#[cfg_attr(feature = "clone", derive(Clone))]
698#[derive(Deserialize, PartialEq)]
699pub enum ZigbeeAuDa1vgsz5e19Poweronbehavior {
700    #[serde(rename = "off")]
701    Off,
702    #[serde(rename = "on")]
703    On,
704    #[serde(rename = "previous")]
705    Previous,
706    #[serde(rename = "toggle")]
707    Toggle,
708}
709#[cfg_attr(feature = "debug", derive(Debug))]
710#[cfg_attr(feature = "clone", derive(Clone))]
711#[derive(Deserialize, PartialEq)]
712pub enum ZigbeeAuDa1zb2wdmPoweronbehavior {
713    #[serde(rename = "off")]
714    Off,
715    #[serde(rename = "on")]
716    On,
717    #[serde(rename = "previous")]
718    Previous,
719    #[serde(rename = "toggle")]
720    Toggle,
721}
722#[cfg_attr(feature = "debug", derive(Debug))]
723#[cfg_attr(feature = "clone", derive(Clone))]
724#[derive(Deserialize, PartialEq)]
725pub enum ZigbeeAuDa1zbmpro1zxPoweronbehavior {
726    #[serde(rename = "off")]
727    Off,
728    #[serde(rename = "on")]
729    On,
730    #[serde(rename = "previous")]
731    Previous,
732    #[serde(rename = "toggle")]
733    Toggle,
734}
735#[cfg_attr(feature = "debug", derive(Debug))]
736#[cfg_attr(feature = "clone", derive(Clone))]
737#[derive(Deserialize, PartialEq)]
738pub enum ZigbeeAuDa1zbr1gwAction {
739    #[serde(rename = "brightness_step_down")]
740    BrightnessStepDown,
741    #[serde(rename = "brightness_step_up")]
742    BrightnessStepUp,
743    #[serde(rename = "color_temperature_step_down")]
744    ColorTemperatureStepDown,
745    #[serde(rename = "color_temperature_step_up")]
746    ColorTemperatureStepUp,
747    #[serde(rename = "off")]
748    Off,
749    #[serde(rename = "on")]
750    On,
751}
752#[cfg_attr(feature = "debug", derive(Debug))]
753#[cfg_attr(feature = "clone", derive(Clone))]
754#[derive(Deserialize, PartialEq)]
755pub enum ZigbeeAuDa1zbr2gwAction {
756    #[serde(rename = "brightness_step_down")]
757    BrightnessStepDown,
758    #[serde(rename = "brightness_step_up")]
759    BrightnessStepUp,
760    #[serde(rename = "color_temperature_step_down")]
761    ColorTemperatureStepDown,
762    #[serde(rename = "color_temperature_step_up")]
763    ColorTemperatureStepUp,
764    #[serde(rename = "off")]
765    Off,
766    #[serde(rename = "on")]
767    On,
768}
769#[cfg_attr(feature = "debug", derive(Debug))]
770#[cfg_attr(feature = "clone", derive(Clone))]
771#[derive(Deserialize, PartialEq)]
772pub enum ZigbeeAuDa1zbrcAction {
773    #[serde(rename = "brightness_step_down")]
774    BrightnessStepDown,
775    #[serde(rename = "brightness_step_up")]
776    BrightnessStepUp,
777    #[serde(rename = "off")]
778    Off,
779    #[serde(rename = "on")]
780    On,
781    #[serde(rename = "recall_1")]
782    Recall1,
783    #[serde(rename = "store_1")]
784    Store1,
785}
786#[cfg(all(feature = "last_seen_epoch", feature = "last_seen_iso_8601"))]
787compile_error!{"Feature last_seen epoch and iso_8601 are mutually exclusive and cannot be enabled together.
788This was done because it is a global setting in zigbee2mqtt and therefor can't see a reason both would be enabled.
789If you have a any reason to have both ways enabled please submit an issue to https://gitlab.com/seam345/zigbee2mqtt-types/-/issues"}