zigbee2mqtt_types_vendor_kami/
lib.rs1use serde::Deserialize;
2use serde::de::Unexpected;
3use serde::de;
4use serde::Deserializer;
5use zigbee2mqtt_types_base_types::LastSeen;
6#[cfg_attr(feature = "debug", derive(Debug))]
10#[cfg_attr(feature = "clone", derive(Clone))]
11#[derive(Deserialize)]
12pub struct ZigbeeN20 {
13 pub action: ZigbeeN20Action,
15 pub contact: bool,
18 pub linkquality: f64,
20 pub last_seen: Option<LastSeen>,
22 pub elapsed: Option<u64>,
24}
25#[cfg_attr(feature = "debug", derive(Debug))]
26#[cfg_attr(feature = "clone", derive(Clone))]
27#[derive(Deserialize, PartialEq)]
28pub enum ZigbeeN20Action {
29 #[serde(rename = "motion")]
30 Motion,
31}
32#[cfg(all(feature = "last_seen_epoch", feature = "last_seen_iso_8601"))]
33compile_error!{"Feature last_seen epoch and iso_8601 are mutually exclusive and cannot be enabled together.
34This was done because it is a global setting in zigbee2mqtt and therefor can't see a reason both would be enabled.
35If you have a any reason to have both ways enabled please submit an issue to https://gitlab.com/seam345/zigbee2mqtt-types/-/issues"}