zigbee2mqtt_types_vendor_shinasystem/
lib.rs

1use serde::Deserialize;
2use serde::de::Unexpected;
3use serde::de;
4use serde::Deserializer;
5use zigbee2mqtt_types_base_types::LastSeen;
6/// shinasystem:BSM-300ZB [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/BSM-300ZB.html)
7///
8/// 
9#[cfg_attr(feature = "debug", derive(Debug))]
10#[cfg_attr(feature = "clone", derive(Clone))]
11#[derive(Deserialize)]
12pub struct ZigbeeBsmD300zb {
13    ///Triggered action (e.g. a button click)
14    pub action: ZigbeeBsmD300zbAction,
15    ///Remaining battery in %, can take up to 24 hours before reported.
16    pub battery: f64,
17    ///Link quality (signal strength)
18    pub linkquality: f64,
19    ///Voltage of the battery in millivolts
20    pub voltage: f64,
21    /// Optional last_seen type, set as a global zigbee2mqtt setting
22    pub last_seen: Option<LastSeen>,
23    /// Optional elapsed type
24    pub elapsed: Option<u64>,
25}/// shinasystem:CSM-300ZB_V2 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/CSM-300ZB_V2.html)
26///
27/// 
28#[cfg_attr(feature = "debug", derive(Debug))]
29#[cfg_attr(feature = "clone", derive(Clone))]
30#[derive(Deserialize)]
31pub struct ZigbeeCsmD300zbUv2 {
32    ///Remaining battery in %, can take up to 24 hours before reported.
33    pub battery: f64,
34    ///Link quality (signal strength)
35    pub linkquality: f64,
36    ///People count
37    pub people: f64,
38    ///Currently status
39    pub status: ZigbeeCsmD300zbUv2Status,
40    ///Voltage of the battery in millivolts
41    pub voltage: f64,
42    /// Optional last_seen type, set as a global zigbee2mqtt setting
43    pub last_seen: Option<LastSeen>,
44    /// Optional elapsed type
45    pub elapsed: Option<u64>,
46}/// shinasystem:DLM-300Z [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/DLM-300Z.html)
47///
48/// 
49#[cfg_attr(feature = "debug", derive(Debug))]
50#[cfg_attr(feature = "clone", derive(Clone))]
51#[derive(Deserialize)]
52pub struct ZigbeeDlmD300z {
53    ///Triggered action on the lock
54    pub action: ZigbeeDlmD300zAction,
55    ///Source of the triggered action on the lock
56    pub action_source_name: ZigbeeDlmD300zActionsourcename,
57    ///ID of user that triggered the action on the lock
58    pub action_user: f64,
59    ///Remaining battery in %, can take up to 24 hours before reported.
60    pub battery: f64,
61    ///Door status
62    pub door_state: ZigbeeDlmD300zDoorstate,
63    ///Link quality (signal strength)
64    pub linkquality: f64,
65    ///Actual state of the lock
66    pub lock_state: ZigbeeDlmD300zLockstate,
67    ///Zigbee herdsman description: "State of the lock"
68    ///The string values get converted into boolean with: LOCK = true and UNLOCK = false
69    #[serde(deserialize_with = "zigbeedlmd300z_state_deserializer")]
70    pub state: bool,
71    /// Optional last_seen type, set as a global zigbee2mqtt setting
72    pub last_seen: Option<LastSeen>,
73    /// Optional elapsed type
74    pub elapsed: Option<u64>,
75}
76/// Deserialize bool from String with custom value mapping
77fn zigbeedlmd300z_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
78where
79    D: Deserializer<'de>,
80{
81    match String::deserialize(deserializer)?.as_ref() {
82        "LOCK" => Ok(true),
83        "UNLOCK" => Ok(false),
84        other => Err(de::Error::invalid_value(
85            Unexpected::Str(other),
86            &"Value expected was either LOCK or UNLOCK",
87        )),
88    }
89}
90
91/// shinasystem:DMS-300ZB [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/DMS-300ZB.html)
92///
93/// 
94#[cfg_attr(feature = "debug", derive(Debug))]
95#[cfg_attr(feature = "clone", derive(Clone))]
96#[derive(Deserialize)]
97pub struct ZigbeeDmsD300zb {
98    ///Remaining battery in %, can take up to 24 hours before reported.
99    pub battery: f64,
100    ///Link quality (signal strength)
101    pub linkquality: f64,
102    ///Zigbee herdsman description: "Indicates whether "IN and OUT" Sensor of the device detected occupancy"
103    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
104    pub occupancy_and: bool,
105    ///Zigbee herdsman description: "Indicates whether "IN" Sensor of the device detected occupancy"
106    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
107    pub occupancy_in: bool,
108    ///Zigbee herdsman description: "Indicates whether "IN or OUT" Sensor of the device detected occupancy"
109    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
110    pub occupancy_or: bool,
111    ///Zigbee herdsman description: "Indicates whether "OUT" Sensor of the device detected occupancy"
112    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
113    pub occupancy_out: bool,
114    pub occupancy_timeout: f64,
115    ///Voltage of the battery in millivolts
116    pub voltage: f64,
117    /// Optional last_seen type, set as a global zigbee2mqtt setting
118    pub last_seen: Option<LastSeen>,
119    /// Optional elapsed type
120    pub elapsed: Option<u64>,
121}/// shinasystem:DSM-300ZB [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/DSM-300ZB.html)
122///
123/// 
124#[cfg_attr(feature = "debug", derive(Debug))]
125#[cfg_attr(feature = "clone", derive(Clone))]
126#[derive(Deserialize)]
127pub struct ZigbeeDsmD300zb {
128    ///Remaining battery in %, can take up to 24 hours before reported.
129    pub battery: f64,
130    ///Zigbee herdsman description: "Indicates if the contact is closed (= true) or open (= false)"
131    ///Boolean values can be an unintuitive way round: value_on = false and value_off = true, consider double checking Zigbee2MQTT to understand what they mean
132    pub contact: bool,
133    ///Link quality (signal strength)
134    pub linkquality: f64,
135    ///Voltage of the battery in millivolts
136    pub voltage: f64,
137    /// Optional last_seen type, set as a global zigbee2mqtt setting
138    pub last_seen: Option<LastSeen>,
139    /// Optional elapsed type
140    pub elapsed: Option<u64>,
141}/// shinasystem:ISM300Z3 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/ISM300Z3.html)
142///
143/// 
144#[cfg_attr(feature = "debug", derive(Debug))]
145#[cfg_attr(feature = "clone", derive(Clone))]
146#[derive(Deserialize)]
147pub struct ZigbeeIsm300z3 {
148    ///Link quality (signal strength)
149    pub linkquality: f64,
150    ///Operation mode: "auto" - toggle by S/W, "push" - for momentary S/W, "latch" - sync S/W
151    pub operation_mode: ZigbeeIsm300z3Operationmode,
152    ///Zigbee herdsman description: "On/off state of the switch"
153    ///The string values get converted into boolean with: ON = true and OFF = false
154    #[serde(deserialize_with = "zigbeeism300z3_state_l1_deserializer")]
155    pub state_l1: bool,
156    ///Zigbee herdsman description: "On/off state of the switch"
157    ///The string values get converted into boolean with: ON = true and OFF = false
158    #[serde(deserialize_with = "zigbeeism300z3_state_l2_deserializer")]
159    pub state_l2: bool,
160    ///Zigbee herdsman description: "On/off state of the switch"
161    ///The string values get converted into boolean with: ON = true and OFF = false
162    #[serde(deserialize_with = "zigbeeism300z3_state_l3_deserializer")]
163    pub state_l3: bool,
164    /// Optional last_seen type, set as a global zigbee2mqtt setting
165    pub last_seen: Option<LastSeen>,
166    /// Optional elapsed type
167    pub elapsed: Option<u64>,
168}
169/// Deserialize bool from String with custom value mapping
170fn zigbeeism300z3_state_l1_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
171where
172    D: Deserializer<'de>,
173{
174    match String::deserialize(deserializer)?.as_ref() {
175        "ON" => Ok(true),
176        "OFF" => Ok(false),
177        other => Err(de::Error::invalid_value(
178            Unexpected::Str(other),
179            &"Value expected was either ON or OFF",
180        )),
181    }
182}
183
184
185/// Deserialize bool from String with custom value mapping
186fn zigbeeism300z3_state_l2_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
187where
188    D: Deserializer<'de>,
189{
190    match String::deserialize(deserializer)?.as_ref() {
191        "ON" => Ok(true),
192        "OFF" => Ok(false),
193        other => Err(de::Error::invalid_value(
194            Unexpected::Str(other),
195            &"Value expected was either ON or OFF",
196        )),
197    }
198}
199
200
201/// Deserialize bool from String with custom value mapping
202fn zigbeeism300z3_state_l3_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
203where
204    D: Deserializer<'de>,
205{
206    match String::deserialize(deserializer)?.as_ref() {
207        "ON" => Ok(true),
208        "OFF" => Ok(false),
209        other => Err(de::Error::invalid_value(
210            Unexpected::Str(other),
211            &"Value expected was either ON or OFF",
212        )),
213    }
214}
215
216/// shinasystem:MSM-300ZB [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/MSM-300ZB.html)
217///
218/// 
219#[cfg_attr(feature = "debug", derive(Debug))]
220#[cfg_attr(feature = "clone", derive(Clone))]
221#[derive(Deserialize)]
222pub struct ZigbeeMsmD300zb {
223    ///Triggered action (e.g. a button click)
224    pub action: ZigbeeMsmD300zbAction,
225    ///Remaining battery in %, can take up to 24 hours before reported.
226    pub battery: f64,
227    ///Link quality (signal strength)
228    pub linkquality: f64,
229    ///Voltage of the battery in millivolts
230    pub voltage: f64,
231    /// Optional last_seen type, set as a global zigbee2mqtt setting
232    pub last_seen: Option<LastSeen>,
233    /// Optional elapsed type
234    pub elapsed: Option<u64>,
235}/// shinasystem:PMM-300Z1 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/PMM-300Z1.html)
236///
237/// 
238#[cfg_attr(feature = "debug", derive(Debug))]
239#[cfg_attr(feature = "clone", derive(Clone))]
240#[derive(Deserialize)]
241pub struct ZigbeePmmD300z1 {
242    ///Sum of consumed energy
243    pub energy: f64,
244    ///Link quality (signal strength)
245    pub linkquality: f64,
246    ///Instantaneous measured power
247    pub power: f64,
248    /// Optional last_seen type, set as a global zigbee2mqtt setting
249    pub last_seen: Option<LastSeen>,
250    /// Optional elapsed type
251    pub elapsed: Option<u64>,
252}/// shinasystem:PMM-300Z2 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/PMM-300Z2.html)
253///
254/// 
255#[cfg_attr(feature = "debug", derive(Debug))]
256#[cfg_attr(feature = "clone", derive(Clone))]
257#[derive(Deserialize)]
258pub struct ZigbeePmmD300z2 {
259    ///Measured electrical ac frequency
260    pub ac_frequency: f64,
261    ///Instantaneous measured electrical current
262    pub current: f64,
263    ///Sum of consumed energy
264    pub energy: f64,
265    ///Link quality (signal strength)
266    pub linkquality: f64,
267    ///Instantaneous measured power
268    pub power: f64,
269    ///Measured electrical power factor
270    pub power_factor: f64,
271    ///temperature of device internal mcu
272    pub temperature: f64,
273    ///Measured electrical potential value
274    pub voltage: f64,
275    /// Optional last_seen type, set as a global zigbee2mqtt setting
276    pub last_seen: Option<LastSeen>,
277    /// Optional elapsed type
278    pub elapsed: Option<u64>,
279}/// shinasystem:PMM-300Z3 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/PMM-300Z3.html)
280///
281/// 
282#[cfg_attr(feature = "debug", derive(Debug))]
283#[cfg_attr(feature = "clone", derive(Clone))]
284#[derive(Deserialize)]
285pub struct ZigbeePmmD300z3 {
286    ///Measured electrical ac frequency
287    pub ac_frequency: f64,
288    ///Instantaneous measured electrical current
289    pub current: f64,
290    ///Sum of consumed energy
291    pub energy: f64,
292    ///Link quality (signal strength)
293    pub linkquality: f64,
294    ///Instantaneous measured power
295    pub power: f64,
296    ///Measured electrical power factor
297    pub power_factor: f64,
298    ///temperature of device internal mcu
299    pub temperature: f64,
300    ///Measured electrical potential value
301    pub voltage: f64,
302    /// Optional last_seen type, set as a global zigbee2mqtt setting
303    pub last_seen: Option<LastSeen>,
304    /// Optional elapsed type
305    pub elapsed: Option<u64>,
306}/// shinasystem:SBM300Z1 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300Z1.html)
307///
308/// 
309#[cfg_attr(feature = "debug", derive(Debug))]
310#[cfg_attr(feature = "clone", derive(Clone))]
311#[derive(Deserialize)]
312pub struct ZigbeeSbm300z1 {
313    ///Link quality (signal strength)
314    pub linkquality: f64,
315    ///Controls the behavior when the device is powered on after power loss
316    pub power_on_behavior: ZigbeeSbm300z1Poweronbehavior,
317    ///Zigbee herdsman description: "On/off state of the switch"
318    ///The string values get converted into boolean with: ON = true and OFF = false
319    #[serde(deserialize_with = "zigbeesbm300z1_state_deserializer")]
320    pub state: bool,
321    /// Optional last_seen type, set as a global zigbee2mqtt setting
322    pub last_seen: Option<LastSeen>,
323    /// Optional elapsed type
324    pub elapsed: Option<u64>,
325}
326/// Deserialize bool from String with custom value mapping
327fn zigbeesbm300z1_state_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
328where
329    D: Deserializer<'de>,
330{
331    match String::deserialize(deserializer)?.as_ref() {
332        "ON" => Ok(true),
333        "OFF" => Ok(false),
334        other => Err(de::Error::invalid_value(
335            Unexpected::Str(other),
336            &"Value expected was either ON or OFF",
337        )),
338    }
339}
340
341/// shinasystem:SBM300Z2 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300Z2.html)
342///
343/// 
344#[cfg_attr(feature = "debug", derive(Debug))]
345#[cfg_attr(feature = "clone", derive(Clone))]
346#[derive(Deserialize)]
347pub struct ZigbeeSbm300z2 {
348    ///Link quality (signal strength)
349    pub linkquality: f64,
350    ///Zigbee herdsman description: "On/off state of the switch"
351    ///The string values get converted into boolean with: ON = true and OFF = false
352    #[serde(deserialize_with = "zigbeesbm300z2_state_bottom_deserializer")]
353    pub state_bottom: bool,
354    ///Zigbee herdsman description: "On/off state of the switch"
355    ///The string values get converted into boolean with: ON = true and OFF = false
356    #[serde(deserialize_with = "zigbeesbm300z2_state_top_deserializer")]
357    pub state_top: bool,
358    /// Optional last_seen type, set as a global zigbee2mqtt setting
359    pub last_seen: Option<LastSeen>,
360    /// Optional elapsed type
361    pub elapsed: Option<u64>,
362}
363/// Deserialize bool from String with custom value mapping
364fn zigbeesbm300z2_state_bottom_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
365where
366    D: Deserializer<'de>,
367{
368    match String::deserialize(deserializer)?.as_ref() {
369        "ON" => Ok(true),
370        "OFF" => Ok(false),
371        other => Err(de::Error::invalid_value(
372            Unexpected::Str(other),
373            &"Value expected was either ON or OFF",
374        )),
375    }
376}
377
378
379/// Deserialize bool from String with custom value mapping
380fn zigbeesbm300z2_state_top_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
381where
382    D: Deserializer<'de>,
383{
384    match String::deserialize(deserializer)?.as_ref() {
385        "ON" => Ok(true),
386        "OFF" => Ok(false),
387        other => Err(de::Error::invalid_value(
388            Unexpected::Str(other),
389            &"Value expected was either ON or OFF",
390        )),
391    }
392}
393
394/// shinasystem:SBM300Z3 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300Z3.html)
395///
396/// 
397#[cfg_attr(feature = "debug", derive(Debug))]
398#[cfg_attr(feature = "clone", derive(Clone))]
399#[derive(Deserialize)]
400pub struct ZigbeeSbm300z3 {
401    ///Link quality (signal strength)
402    pub linkquality: f64,
403    ///Zigbee herdsman description: "On/off state of the switch"
404    ///The string values get converted into boolean with: ON = true and OFF = false
405    #[serde(deserialize_with = "zigbeesbm300z3_state_bottom_deserializer")]
406    pub state_bottom: bool,
407    ///Zigbee herdsman description: "On/off state of the switch"
408    ///The string values get converted into boolean with: ON = true and OFF = false
409    #[serde(deserialize_with = "zigbeesbm300z3_state_center_deserializer")]
410    pub state_center: bool,
411    ///Zigbee herdsman description: "On/off state of the switch"
412    ///The string values get converted into boolean with: ON = true and OFF = false
413    #[serde(deserialize_with = "zigbeesbm300z3_state_top_deserializer")]
414    pub state_top: bool,
415    /// Optional last_seen type, set as a global zigbee2mqtt setting
416    pub last_seen: Option<LastSeen>,
417    /// Optional elapsed type
418    pub elapsed: Option<u64>,
419}
420/// Deserialize bool from String with custom value mapping
421fn zigbeesbm300z3_state_bottom_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
422where
423    D: Deserializer<'de>,
424{
425    match String::deserialize(deserializer)?.as_ref() {
426        "ON" => Ok(true),
427        "OFF" => Ok(false),
428        other => Err(de::Error::invalid_value(
429            Unexpected::Str(other),
430            &"Value expected was either ON or OFF",
431        )),
432    }
433}
434
435
436/// Deserialize bool from String with custom value mapping
437fn zigbeesbm300z3_state_center_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
438where
439    D: Deserializer<'de>,
440{
441    match String::deserialize(deserializer)?.as_ref() {
442        "ON" => Ok(true),
443        "OFF" => Ok(false),
444        other => Err(de::Error::invalid_value(
445            Unexpected::Str(other),
446            &"Value expected was either ON or OFF",
447        )),
448    }
449}
450
451
452/// Deserialize bool from String with custom value mapping
453fn zigbeesbm300z3_state_top_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
454where
455    D: Deserializer<'de>,
456{
457    match String::deserialize(deserializer)?.as_ref() {
458        "ON" => Ok(true),
459        "OFF" => Ok(false),
460        other => Err(de::Error::invalid_value(
461            Unexpected::Str(other),
462            &"Value expected was either ON or OFF",
463        )),
464    }
465}
466
467/// shinasystem:SBM300Z4 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300Z4.html)
468///
469/// 
470#[cfg_attr(feature = "debug", derive(Debug))]
471#[cfg_attr(feature = "clone", derive(Clone))]
472#[derive(Deserialize)]
473pub struct ZigbeeSbm300z4 {
474    ///Link quality (signal strength)
475    pub linkquality: f64,
476    ///Zigbee herdsman description: "On/off state of the switch"
477    ///The string values get converted into boolean with: ON = true and OFF = false
478    #[serde(deserialize_with = "zigbeesbm300z4_state_bottom_left_deserializer")]
479    pub state_bottom_left: bool,
480    ///Zigbee herdsman description: "On/off state of the switch"
481    ///The string values get converted into boolean with: ON = true and OFF = false
482    #[serde(deserialize_with = "zigbeesbm300z4_state_bottom_right_deserializer")]
483    pub state_bottom_right: bool,
484    ///Zigbee herdsman description: "On/off state of the switch"
485    ///The string values get converted into boolean with: ON = true and OFF = false
486    #[serde(deserialize_with = "zigbeesbm300z4_state_top_left_deserializer")]
487    pub state_top_left: bool,
488    ///Zigbee herdsman description: "On/off state of the switch"
489    ///The string values get converted into boolean with: ON = true and OFF = false
490    #[serde(deserialize_with = "zigbeesbm300z4_state_top_right_deserializer")]
491    pub state_top_right: bool,
492    /// Optional last_seen type, set as a global zigbee2mqtt setting
493    pub last_seen: Option<LastSeen>,
494    /// Optional elapsed type
495    pub elapsed: Option<u64>,
496}
497/// Deserialize bool from String with custom value mapping
498fn zigbeesbm300z4_state_bottom_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
499where
500    D: Deserializer<'de>,
501{
502    match String::deserialize(deserializer)?.as_ref() {
503        "ON" => Ok(true),
504        "OFF" => Ok(false),
505        other => Err(de::Error::invalid_value(
506            Unexpected::Str(other),
507            &"Value expected was either ON or OFF",
508        )),
509    }
510}
511
512
513/// Deserialize bool from String with custom value mapping
514fn zigbeesbm300z4_state_bottom_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
515where
516    D: Deserializer<'de>,
517{
518    match String::deserialize(deserializer)?.as_ref() {
519        "ON" => Ok(true),
520        "OFF" => Ok(false),
521        other => Err(de::Error::invalid_value(
522            Unexpected::Str(other),
523            &"Value expected was either ON or OFF",
524        )),
525    }
526}
527
528
529/// Deserialize bool from String with custom value mapping
530fn zigbeesbm300z4_state_top_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
531where
532    D: Deserializer<'de>,
533{
534    match String::deserialize(deserializer)?.as_ref() {
535        "ON" => Ok(true),
536        "OFF" => Ok(false),
537        other => Err(de::Error::invalid_value(
538            Unexpected::Str(other),
539            &"Value expected was either ON or OFF",
540        )),
541    }
542}
543
544
545/// Deserialize bool from String with custom value mapping
546fn zigbeesbm300z4_state_top_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
547where
548    D: Deserializer<'de>,
549{
550    match String::deserialize(deserializer)?.as_ref() {
551        "ON" => Ok(true),
552        "OFF" => Ok(false),
553        other => Err(de::Error::invalid_value(
554            Unexpected::Str(other),
555            &"Value expected was either ON or OFF",
556        )),
557    }
558}
559
560/// shinasystem:SBM300Z5 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300Z5.html)
561///
562/// 
563#[cfg_attr(feature = "debug", derive(Debug))]
564#[cfg_attr(feature = "clone", derive(Clone))]
565#[derive(Deserialize)]
566pub struct ZigbeeSbm300z5 {
567    ///Link quality (signal strength)
568    pub linkquality: f64,
569    ///Zigbee herdsman description: "On/off state of the switch"
570    ///The string values get converted into boolean with: ON = true and OFF = false
571    #[serde(deserialize_with = "zigbeesbm300z5_state_bottom_left_deserializer")]
572    pub state_bottom_left: bool,
573    ///Zigbee herdsman description: "On/off state of the switch"
574    ///The string values get converted into boolean with: ON = true and OFF = false
575    #[serde(deserialize_with = "zigbeesbm300z5_state_bottom_right_deserializer")]
576    pub state_bottom_right: bool,
577    ///Zigbee herdsman description: "On/off state of the switch"
578    ///The string values get converted into boolean with: ON = true and OFF = false
579    #[serde(deserialize_with = "zigbeesbm300z5_state_center_left_deserializer")]
580    pub state_center_left: bool,
581    ///Zigbee herdsman description: "On/off state of the switch"
582    ///The string values get converted into boolean with: ON = true and OFF = false
583    #[serde(deserialize_with = "zigbeesbm300z5_state_top_left_deserializer")]
584    pub state_top_left: bool,
585    ///Zigbee herdsman description: "On/off state of the switch"
586    ///The string values get converted into boolean with: ON = true and OFF = false
587    #[serde(deserialize_with = "zigbeesbm300z5_state_top_right_deserializer")]
588    pub state_top_right: bool,
589    /// Optional last_seen type, set as a global zigbee2mqtt setting
590    pub last_seen: Option<LastSeen>,
591    /// Optional elapsed type
592    pub elapsed: Option<u64>,
593}
594/// Deserialize bool from String with custom value mapping
595fn zigbeesbm300z5_state_bottom_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
596where
597    D: Deserializer<'de>,
598{
599    match String::deserialize(deserializer)?.as_ref() {
600        "ON" => Ok(true),
601        "OFF" => Ok(false),
602        other => Err(de::Error::invalid_value(
603            Unexpected::Str(other),
604            &"Value expected was either ON or OFF",
605        )),
606    }
607}
608
609
610/// Deserialize bool from String with custom value mapping
611fn zigbeesbm300z5_state_bottom_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
612where
613    D: Deserializer<'de>,
614{
615    match String::deserialize(deserializer)?.as_ref() {
616        "ON" => Ok(true),
617        "OFF" => Ok(false),
618        other => Err(de::Error::invalid_value(
619            Unexpected::Str(other),
620            &"Value expected was either ON or OFF",
621        )),
622    }
623}
624
625
626/// Deserialize bool from String with custom value mapping
627fn zigbeesbm300z5_state_center_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
628where
629    D: Deserializer<'de>,
630{
631    match String::deserialize(deserializer)?.as_ref() {
632        "ON" => Ok(true),
633        "OFF" => Ok(false),
634        other => Err(de::Error::invalid_value(
635            Unexpected::Str(other),
636            &"Value expected was either ON or OFF",
637        )),
638    }
639}
640
641
642/// Deserialize bool from String with custom value mapping
643fn zigbeesbm300z5_state_top_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
644where
645    D: Deserializer<'de>,
646{
647    match String::deserialize(deserializer)?.as_ref() {
648        "ON" => Ok(true),
649        "OFF" => Ok(false),
650        other => Err(de::Error::invalid_value(
651            Unexpected::Str(other),
652            &"Value expected was either ON or OFF",
653        )),
654    }
655}
656
657
658/// Deserialize bool from String with custom value mapping
659fn zigbeesbm300z5_state_top_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
660where
661    D: Deserializer<'de>,
662{
663    match String::deserialize(deserializer)?.as_ref() {
664        "ON" => Ok(true),
665        "OFF" => Ok(false),
666        other => Err(de::Error::invalid_value(
667            Unexpected::Str(other),
668            &"Value expected was either ON or OFF",
669        )),
670    }
671}
672
673/// shinasystem:SBM300Z6 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300Z6.html)
674///
675/// 
676#[cfg_attr(feature = "debug", derive(Debug))]
677#[cfg_attr(feature = "clone", derive(Clone))]
678#[derive(Deserialize)]
679pub struct ZigbeeSbm300z6 {
680    ///Link quality (signal strength)
681    pub linkquality: f64,
682    ///Zigbee herdsman description: "On/off state of the switch"
683    ///The string values get converted into boolean with: ON = true and OFF = false
684    #[serde(deserialize_with = "zigbeesbm300z6_state_bottom_left_deserializer")]
685    pub state_bottom_left: bool,
686    ///Zigbee herdsman description: "On/off state of the switch"
687    ///The string values get converted into boolean with: ON = true and OFF = false
688    #[serde(deserialize_with = "zigbeesbm300z6_state_bottom_right_deserializer")]
689    pub state_bottom_right: bool,
690    ///Zigbee herdsman description: "On/off state of the switch"
691    ///The string values get converted into boolean with: ON = true and OFF = false
692    #[serde(deserialize_with = "zigbeesbm300z6_state_center_left_deserializer")]
693    pub state_center_left: bool,
694    ///Zigbee herdsman description: "On/off state of the switch"
695    ///The string values get converted into boolean with: ON = true and OFF = false
696    #[serde(deserialize_with = "zigbeesbm300z6_state_center_right_deserializer")]
697    pub state_center_right: bool,
698    ///Zigbee herdsman description: "On/off state of the switch"
699    ///The string values get converted into boolean with: ON = true and OFF = false
700    #[serde(deserialize_with = "zigbeesbm300z6_state_top_left_deserializer")]
701    pub state_top_left: bool,
702    ///Zigbee herdsman description: "On/off state of the switch"
703    ///The string values get converted into boolean with: ON = true and OFF = false
704    #[serde(deserialize_with = "zigbeesbm300z6_state_top_right_deserializer")]
705    pub state_top_right: bool,
706    /// Optional last_seen type, set as a global zigbee2mqtt setting
707    pub last_seen: Option<LastSeen>,
708    /// Optional elapsed type
709    pub elapsed: Option<u64>,
710}
711/// Deserialize bool from String with custom value mapping
712fn zigbeesbm300z6_state_bottom_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
713where
714    D: Deserializer<'de>,
715{
716    match String::deserialize(deserializer)?.as_ref() {
717        "ON" => Ok(true),
718        "OFF" => Ok(false),
719        other => Err(de::Error::invalid_value(
720            Unexpected::Str(other),
721            &"Value expected was either ON or OFF",
722        )),
723    }
724}
725
726
727/// Deserialize bool from String with custom value mapping
728fn zigbeesbm300z6_state_bottom_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
729where
730    D: Deserializer<'de>,
731{
732    match String::deserialize(deserializer)?.as_ref() {
733        "ON" => Ok(true),
734        "OFF" => Ok(false),
735        other => Err(de::Error::invalid_value(
736            Unexpected::Str(other),
737            &"Value expected was either ON or OFF",
738        )),
739    }
740}
741
742
743/// Deserialize bool from String with custom value mapping
744fn zigbeesbm300z6_state_center_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
745where
746    D: Deserializer<'de>,
747{
748    match String::deserialize(deserializer)?.as_ref() {
749        "ON" => Ok(true),
750        "OFF" => Ok(false),
751        other => Err(de::Error::invalid_value(
752            Unexpected::Str(other),
753            &"Value expected was either ON or OFF",
754        )),
755    }
756}
757
758
759/// Deserialize bool from String with custom value mapping
760fn zigbeesbm300z6_state_center_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
761where
762    D: Deserializer<'de>,
763{
764    match String::deserialize(deserializer)?.as_ref() {
765        "ON" => Ok(true),
766        "OFF" => Ok(false),
767        other => Err(de::Error::invalid_value(
768            Unexpected::Str(other),
769            &"Value expected was either ON or OFF",
770        )),
771    }
772}
773
774
775/// Deserialize bool from String with custom value mapping
776fn zigbeesbm300z6_state_top_left_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
777where
778    D: Deserializer<'de>,
779{
780    match String::deserialize(deserializer)?.as_ref() {
781        "ON" => Ok(true),
782        "OFF" => Ok(false),
783        other => Err(de::Error::invalid_value(
784            Unexpected::Str(other),
785            &"Value expected was either ON or OFF",
786        )),
787    }
788}
789
790
791/// Deserialize bool from String with custom value mapping
792fn zigbeesbm300z6_state_top_right_deserializer<'de, D>(deserializer: D) -> Result<bool, D::Error>
793where
794    D: Deserializer<'de>,
795{
796    match String::deserialize(deserializer)?.as_ref() {
797        "ON" => Ok(true),
798        "OFF" => Ok(false),
799        other => Err(de::Error::invalid_value(
800            Unexpected::Str(other),
801            &"Value expected was either ON or OFF",
802        )),
803    }
804}
805
806/// shinasystem:SBM300ZB1 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZB1.html)
807///
808/// 
809#[cfg_attr(feature = "debug", derive(Debug))]
810#[cfg_attr(feature = "clone", derive(Clone))]
811#[derive(Deserialize)]
812pub struct ZigbeeSbm300zb1 {
813    ///Triggered action (e.g. a button click)
814    pub action: ZigbeeSbm300zb1Action,
815    ///Remaining battery in %, can take up to 24 hours before reported.
816    pub battery: f64,
817    ///Link quality (signal strength)
818    pub linkquality: f64,
819    ///Voltage of the battery in millivolts
820    pub voltage: f64,
821    /// Optional last_seen type, set as a global zigbee2mqtt setting
822    pub last_seen: Option<LastSeen>,
823    /// Optional elapsed type
824    pub elapsed: Option<u64>,
825}/// shinasystem:SBM300ZB2 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZB2.html)
826///
827/// 
828#[cfg_attr(feature = "debug", derive(Debug))]
829#[cfg_attr(feature = "clone", derive(Clone))]
830#[derive(Deserialize)]
831pub struct ZigbeeSbm300zb2 {
832    ///Triggered action (e.g. a button click)
833    pub action: ZigbeeSbm300zb2Action,
834    ///Remaining battery in %, can take up to 24 hours before reported.
835    pub battery: f64,
836    ///Link quality (signal strength)
837    pub linkquality: f64,
838    ///Voltage of the battery in millivolts
839    pub voltage: f64,
840    /// Optional last_seen type, set as a global zigbee2mqtt setting
841    pub last_seen: Option<LastSeen>,
842    /// Optional elapsed type
843    pub elapsed: Option<u64>,
844}/// shinasystem:SBM300ZB3 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZB3.html)
845///
846/// 
847#[cfg_attr(feature = "debug", derive(Debug))]
848#[cfg_attr(feature = "clone", derive(Clone))]
849#[derive(Deserialize)]
850pub struct ZigbeeSbm300zb3 {
851    ///Triggered action (e.g. a button click)
852    pub action: ZigbeeSbm300zb3Action,
853    ///Remaining battery in %, can take up to 24 hours before reported.
854    pub battery: f64,
855    ///Link quality (signal strength)
856    pub linkquality: f64,
857    ///Voltage of the battery in millivolts
858    pub voltage: f64,
859    /// Optional last_seen type, set as a global zigbee2mqtt setting
860    pub last_seen: Option<LastSeen>,
861    /// Optional elapsed type
862    pub elapsed: Option<u64>,
863}/// shinasystem:SBM300ZB4 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZB4.html)
864///
865/// 
866#[cfg_attr(feature = "debug", derive(Debug))]
867#[cfg_attr(feature = "clone", derive(Clone))]
868#[derive(Deserialize)]
869pub struct ZigbeeSbm300zb4 {
870    ///Triggered action (e.g. a button click)
871    pub action: ZigbeeSbm300zb4Action,
872    ///Remaining battery in %, can take up to 24 hours before reported.
873    pub battery: f64,
874    ///Link quality (signal strength)
875    pub linkquality: f64,
876    ///Voltage of the battery in millivolts
877    pub voltage: f64,
878    /// Optional last_seen type, set as a global zigbee2mqtt setting
879    pub last_seen: Option<LastSeen>,
880    /// Optional elapsed type
881    pub elapsed: Option<u64>,
882}/// shinasystem:SBM300ZC1 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZC1.html)
883///
884/// 
885#[cfg_attr(feature = "debug", derive(Debug))]
886#[cfg_attr(feature = "clone", derive(Clone))]
887#[derive(Deserialize)]
888pub struct ZigbeeSbm300zc1 {
889    ///Triggered action (e.g. a button click)
890    pub action: ZigbeeSbm300zc1Action,
891    ///Remaining battery in %, can take up to 24 hours before reported.
892    pub battery: f64,
893    ///Link quality (signal strength)
894    pub linkquality: f64,
895    ///Voltage of the battery in millivolts
896    pub voltage: f64,
897    /// Optional last_seen type, set as a global zigbee2mqtt setting
898    pub last_seen: Option<LastSeen>,
899    /// Optional elapsed type
900    pub elapsed: Option<u64>,
901}/// shinasystem:SBM300ZC2 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZC2.html)
902///
903/// 
904#[cfg_attr(feature = "debug", derive(Debug))]
905#[cfg_attr(feature = "clone", derive(Clone))]
906#[derive(Deserialize)]
907pub struct ZigbeeSbm300zc2 {
908    ///Triggered action (e.g. a button click)
909    pub action: ZigbeeSbm300zc2Action,
910    ///Remaining battery in %, can take up to 24 hours before reported.
911    pub battery: f64,
912    ///Link quality (signal strength)
913    pub linkquality: f64,
914    ///Voltage of the battery in millivolts
915    pub voltage: f64,
916    /// Optional last_seen type, set as a global zigbee2mqtt setting
917    pub last_seen: Option<LastSeen>,
918    /// Optional elapsed type
919    pub elapsed: Option<u64>,
920}/// shinasystem:SBM300ZC3 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZC3.html)
921///
922/// 
923#[cfg_attr(feature = "debug", derive(Debug))]
924#[cfg_attr(feature = "clone", derive(Clone))]
925#[derive(Deserialize)]
926pub struct ZigbeeSbm300zc3 {
927    ///Triggered action (e.g. a button click)
928    pub action: ZigbeeSbm300zc3Action,
929    ///Remaining battery in %, can take up to 24 hours before reported.
930    pub battery: f64,
931    ///Link quality (signal strength)
932    pub linkquality: f64,
933    ///Voltage of the battery in millivolts
934    pub voltage: f64,
935    /// Optional last_seen type, set as a global zigbee2mqtt setting
936    pub last_seen: Option<LastSeen>,
937    /// Optional elapsed type
938    pub elapsed: Option<u64>,
939}/// shinasystem:SBM300ZC4 [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/SBM300ZC4.html)
940///
941/// 
942#[cfg_attr(feature = "debug", derive(Debug))]
943#[cfg_attr(feature = "clone", derive(Clone))]
944#[derive(Deserialize)]
945pub struct ZigbeeSbm300zc4 {
946    ///Triggered action (e.g. a button click)
947    pub action: ZigbeeSbm300zc4Action,
948    ///Remaining battery in %, can take up to 24 hours before reported.
949    pub battery: f64,
950    ///Link quality (signal strength)
951    pub linkquality: f64,
952    ///Voltage of the battery in millivolts
953    pub voltage: f64,
954    /// Optional last_seen type, set as a global zigbee2mqtt setting
955    pub last_seen: Option<LastSeen>,
956    /// Optional elapsed type
957    pub elapsed: Option<u64>,
958}/// shinasystem:TSM-300ZB [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/TSM-300ZB.html)
959///
960/// 
961#[cfg_attr(feature = "debug", derive(Debug))]
962#[cfg_attr(feature = "clone", derive(Clone))]
963#[derive(Deserialize)]
964pub struct ZigbeeTsmD300zb {
965    ///Remaining battery in %, can take up to 24 hours before reported.
966    pub battery: f64,
967    ///Measured relative humidity
968    pub humidity: f64,
969    ///Link quality (signal strength)
970    pub linkquality: f64,
971    ///Measured temperature value
972    pub temperature: f64,
973    ///Voltage of the battery in millivolts
974    pub voltage: f64,
975    /// Optional last_seen type, set as a global zigbee2mqtt setting
976    pub last_seen: Option<LastSeen>,
977    /// Optional elapsed type
978    pub elapsed: Option<u64>,
979}/// shinasystem:USM-300ZB [zigbee2mqtt link](https://www.zigbee2mqtt.io/devices/USM-300ZB.html)
980///
981/// 
982#[cfg_attr(feature = "debug", derive(Debug))]
983#[cfg_attr(feature = "clone", derive(Clone))]
984#[derive(Deserialize)]
985pub struct ZigbeeUsmD300zb {
986    ///Remaining battery in %, can take up to 24 hours before reported.
987    pub battery: f64,
988    ///Measured relative humidity
989    pub humidity: f64,
990    ///Measured illuminance in lux
991    pub illuminance: f64,
992    ///Link quality (signal strength)
993    pub linkquality: f64,
994    ///Zigbee herdsman description: "Indicates whether the device detected occupancy"
995    ///Boolean values can be an unintuitive way round: value_on = true and value_off = false, consider double checking Zigbee2MQTT to understand what they mean
996    pub occupancy: bool,
997    ///Measured temperature value
998    pub temperature: f64,
999    ///Voltage of the battery in millivolts
1000    pub voltage: f64,
1001    /// Optional last_seen type, set as a global zigbee2mqtt setting
1002    pub last_seen: Option<LastSeen>,
1003    /// Optional elapsed type
1004    pub elapsed: Option<u64>,
1005}
1006#[cfg_attr(feature = "debug", derive(Debug))]
1007#[cfg_attr(feature = "clone", derive(Clone))]
1008#[derive(Deserialize, PartialEq)]
1009pub enum ZigbeeBsmD300zbAction {
1010    #[serde(rename = "double")]
1011    Double,
1012    #[serde(rename = "long")]
1013    Long,
1014    #[serde(rename = "single")]
1015    Single,
1016}
1017#[cfg_attr(feature = "debug", derive(Debug))]
1018#[cfg_attr(feature = "clone", derive(Clone))]
1019#[derive(Deserialize, PartialEq)]
1020pub enum ZigbeeCsmD300zbUv2Status {
1021    #[serde(rename = "idle")]
1022    Idle,
1023    #[serde(rename = "in")]
1024    In,
1025    #[serde(rename = "out")]
1026    Out,
1027}
1028#[cfg_attr(feature = "debug", derive(Debug))]
1029#[cfg_attr(feature = "clone", derive(Clone))]
1030#[derive(Deserialize, PartialEq)]
1031pub enum ZigbeeDlmD300zAction {
1032    #[serde(rename = "auto_lock")]
1033    AutoLock,
1034    #[serde(rename = "key_lock")]
1035    KeyLock,
1036    #[serde(rename = "key_unlock")]
1037    KeyUnlock,
1038    #[serde(rename = "lock")]
1039    Lock,
1040    #[serde(rename = "lock_failure_invalid_pin_or_id")]
1041    LockFailureInvalidPinOrId,
1042    #[serde(rename = "lock_failure_invalid_schedule")]
1043    LockFailureInvalidSchedule,
1044    #[serde(rename = "manual_lock")]
1045    ManualLock,
1046    #[serde(rename = "manual_unlock")]
1047    ManualUnlock,
1048    #[serde(rename = "non_access_user_operational_event")]
1049    NonAccessUserOperationalEvent,
1050    #[serde(rename = "one_touch_lock")]
1051    OneTouchLock,
1052    #[serde(rename = "schedule_lock")]
1053    ScheduleLock,
1054    #[serde(rename = "schedule_unlock")]
1055    ScheduleUnlock,
1056    #[serde(rename = "unknown")]
1057    Unknown,
1058    #[serde(rename = "unlock")]
1059    Unlock,
1060    #[serde(rename = "unlock_failure_invalid_pin_or_id")]
1061    UnlockFailureInvalidPinOrId,
1062    #[serde(rename = "unlock_failure_invalid_schedule")]
1063    UnlockFailureInvalidSchedule,
1064}
1065#[cfg_attr(feature = "debug", derive(Debug))]
1066#[cfg_attr(feature = "clone", derive(Clone))]
1067#[derive(Deserialize, PartialEq)]
1068pub enum ZigbeeDlmD300zActionsourcename {
1069    #[serde(rename = "keypad")]
1070    Keypad,
1071    #[serde(rename = "manual")]
1072    Manual,
1073    #[serde(rename = "rf")]
1074    Rf,
1075    #[serde(rename = "rfid")]
1076    Rfid,
1077}
1078#[cfg_attr(feature = "debug", derive(Debug))]
1079#[cfg_attr(feature = "clone", derive(Clone))]
1080#[derive(Deserialize, PartialEq)]
1081pub enum ZigbeeDlmD300zDoorstate {
1082    #[serde(rename = "closed")]
1083    Closed,
1084    #[serde(rename = "open")]
1085    Open,
1086}
1087#[cfg_attr(feature = "debug", derive(Debug))]
1088#[cfg_attr(feature = "clone", derive(Clone))]
1089#[derive(Deserialize, PartialEq)]
1090pub enum ZigbeeDlmD300zLockstate {
1091    #[serde(rename = "locked")]
1092    Locked,
1093    #[serde(rename = "not_fully_locked")]
1094    NotFullyLocked,
1095    #[serde(rename = "unlocked")]
1096    Unlocked,
1097}
1098#[cfg_attr(feature = "debug", derive(Debug))]
1099#[cfg_attr(feature = "clone", derive(Clone))]
1100#[derive(Deserialize, PartialEq)]
1101pub enum ZigbeeIsm300z3Operationmode {
1102    #[serde(rename = "auto")]
1103    Auto,
1104    #[serde(rename = "latch")]
1105    Latch,
1106    #[serde(rename = "push")]
1107    Push,
1108}
1109#[cfg_attr(feature = "debug", derive(Debug))]
1110#[cfg_attr(feature = "clone", derive(Clone))]
1111#[derive(Deserialize, PartialEq)]
1112pub enum ZigbeeMsmD300zbAction {
1113    #[serde(rename = "1_double")]
1114    Number1Double,
1115    #[serde(rename = "1_long")]
1116    Number1Long,
1117    #[serde(rename = "1_single")]
1118    Number1Single,
1119    #[serde(rename = "2_double")]
1120    Number2Double,
1121    #[serde(rename = "2_long")]
1122    Number2Long,
1123    #[serde(rename = "2_single")]
1124    Number2Single,
1125    #[serde(rename = "3_double")]
1126    Number3Double,
1127    #[serde(rename = "3_long")]
1128    Number3Long,
1129    #[serde(rename = "3_single")]
1130    Number3Single,
1131    #[serde(rename = "4_double")]
1132    Number4Double,
1133    #[serde(rename = "4_long")]
1134    Number4Long,
1135    #[serde(rename = "4_single")]
1136    Number4Single,
1137}
1138#[cfg_attr(feature = "debug", derive(Debug))]
1139#[cfg_attr(feature = "clone", derive(Clone))]
1140#[derive(Deserialize, PartialEq)]
1141pub enum ZigbeeSbm300z1Poweronbehavior {
1142    #[serde(rename = "off")]
1143    Off,
1144    #[serde(rename = "on")]
1145    On,
1146    #[serde(rename = "previous")]
1147    Previous,
1148    #[serde(rename = "toggle")]
1149    Toggle,
1150}
1151#[cfg_attr(feature = "debug", derive(Debug))]
1152#[cfg_attr(feature = "clone", derive(Clone))]
1153#[derive(Deserialize, PartialEq)]
1154pub enum ZigbeeSbm300zb1Action {
1155    #[serde(rename = "double")]
1156    Double,
1157    #[serde(rename = "long")]
1158    Long,
1159    #[serde(rename = "single")]
1160    Single,
1161}
1162#[cfg_attr(feature = "debug", derive(Debug))]
1163#[cfg_attr(feature = "clone", derive(Clone))]
1164#[derive(Deserialize, PartialEq)]
1165pub enum ZigbeeSbm300zb2Action {
1166    #[serde(rename = "1_double")]
1167    Number1Double,
1168    #[serde(rename = "1_long")]
1169    Number1Long,
1170    #[serde(rename = "1_single")]
1171    Number1Single,
1172    #[serde(rename = "2_double")]
1173    Number2Double,
1174    #[serde(rename = "2_long")]
1175    Number2Long,
1176    #[serde(rename = "2_single")]
1177    Number2Single,
1178}
1179#[cfg_attr(feature = "debug", derive(Debug))]
1180#[cfg_attr(feature = "clone", derive(Clone))]
1181#[derive(Deserialize, PartialEq)]
1182pub enum ZigbeeSbm300zb3Action {
1183    #[serde(rename = "1_double")]
1184    Number1Double,
1185    #[serde(rename = "1_long")]
1186    Number1Long,
1187    #[serde(rename = "1_single")]
1188    Number1Single,
1189    #[serde(rename = "2_double")]
1190    Number2Double,
1191    #[serde(rename = "2_long")]
1192    Number2Long,
1193    #[serde(rename = "2_single")]
1194    Number2Single,
1195    #[serde(rename = "3_double")]
1196    Number3Double,
1197    #[serde(rename = "3_long")]
1198    Number3Long,
1199    #[serde(rename = "3_single")]
1200    Number3Single,
1201}
1202#[cfg_attr(feature = "debug", derive(Debug))]
1203#[cfg_attr(feature = "clone", derive(Clone))]
1204#[derive(Deserialize, PartialEq)]
1205pub enum ZigbeeSbm300zb4Action {
1206    #[serde(rename = "1_double")]
1207    Number1Double,
1208    #[serde(rename = "1_long")]
1209    Number1Long,
1210    #[serde(rename = "1_single")]
1211    Number1Single,
1212    #[serde(rename = "2_double")]
1213    Number2Double,
1214    #[serde(rename = "2_long")]
1215    Number2Long,
1216    #[serde(rename = "2_single")]
1217    Number2Single,
1218    #[serde(rename = "3_double")]
1219    Number3Double,
1220    #[serde(rename = "3_long")]
1221    Number3Long,
1222    #[serde(rename = "3_single")]
1223    Number3Single,
1224    #[serde(rename = "4_double")]
1225    Number4Double,
1226    #[serde(rename = "4_long")]
1227    Number4Long,
1228    #[serde(rename = "4_single")]
1229    Number4Single,
1230}
1231#[cfg_attr(feature = "debug", derive(Debug))]
1232#[cfg_attr(feature = "clone", derive(Clone))]
1233#[derive(Deserialize, PartialEq)]
1234pub enum ZigbeeSbm300zc1Action {
1235    #[serde(rename = "double")]
1236    Double,
1237    #[serde(rename = "long")]
1238    Long,
1239    #[serde(rename = "single")]
1240    Single,
1241}
1242#[cfg_attr(feature = "debug", derive(Debug))]
1243#[cfg_attr(feature = "clone", derive(Clone))]
1244#[derive(Deserialize, PartialEq)]
1245pub enum ZigbeeSbm300zc2Action {
1246    #[serde(rename = "1_double")]
1247    Number1Double,
1248    #[serde(rename = "1_long")]
1249    Number1Long,
1250    #[serde(rename = "1_single")]
1251    Number1Single,
1252    #[serde(rename = "2_double")]
1253    Number2Double,
1254    #[serde(rename = "2_long")]
1255    Number2Long,
1256    #[serde(rename = "2_single")]
1257    Number2Single,
1258}
1259#[cfg_attr(feature = "debug", derive(Debug))]
1260#[cfg_attr(feature = "clone", derive(Clone))]
1261#[derive(Deserialize, PartialEq)]
1262pub enum ZigbeeSbm300zc3Action {
1263    #[serde(rename = "1_double")]
1264    Number1Double,
1265    #[serde(rename = "1_long")]
1266    Number1Long,
1267    #[serde(rename = "1_single")]
1268    Number1Single,
1269    #[serde(rename = "2_double")]
1270    Number2Double,
1271    #[serde(rename = "2_long")]
1272    Number2Long,
1273    #[serde(rename = "2_single")]
1274    Number2Single,
1275    #[serde(rename = "3_double")]
1276    Number3Double,
1277    #[serde(rename = "3_long")]
1278    Number3Long,
1279    #[serde(rename = "3_single")]
1280    Number3Single,
1281}
1282#[cfg_attr(feature = "debug", derive(Debug))]
1283#[cfg_attr(feature = "clone", derive(Clone))]
1284#[derive(Deserialize, PartialEq)]
1285pub enum ZigbeeSbm300zc4Action {
1286    #[serde(rename = "1_double")]
1287    Number1Double,
1288    #[serde(rename = "1_long")]
1289    Number1Long,
1290    #[serde(rename = "1_single")]
1291    Number1Single,
1292    #[serde(rename = "2_double")]
1293    Number2Double,
1294    #[serde(rename = "2_long")]
1295    Number2Long,
1296    #[serde(rename = "2_single")]
1297    Number2Single,
1298    #[serde(rename = "3_double")]
1299    Number3Double,
1300    #[serde(rename = "3_long")]
1301    Number3Long,
1302    #[serde(rename = "3_single")]
1303    Number3Single,
1304    #[serde(rename = "4_double")]
1305    Number4Double,
1306    #[serde(rename = "4_long")]
1307    Number4Long,
1308    #[serde(rename = "4_single")]
1309    Number4Single,
1310}
1311#[cfg(all(feature = "last_seen_epoch", feature = "last_seen_iso_8601"))]
1312compile_error!{"Feature last_seen epoch and iso_8601 are mutually exclusive and cannot be enabled together.
1313This was done because it is a global setting in zigbee2mqtt and therefor can't see a reason both would be enabled.
1314If you have a any reason to have both ways enabled please submit an issue to https://gitlab.com/seam345/zigbee2mqtt-types/-/issues"}