pub struct Unit {
pub ain: String,
pub name: String,
pub kind: Option<String>,
pub on: Option<bool>,
pub temperature: Option<f64>,
pub target: Option<Target>,
pub power: Option<f64>,
pub energy: Option<u64>,
pub voltage: Option<f64>,
pub level: Option<u8>,
pub humidity: Option<u8>,
pub alerts: Vec<String>,
}Expand description
A function of a device, like a switch, and its values.
Fields§
§ain: String§name: String§kind: Option<String>Like avmPlugSocket, avmThermostat or dimmableColorBulb.
on: Option<bool>Whether a switch is on.
temperature: Option<f64>The measured temperature in °C.
target: Option<Target>The target of a thermostat.
power: Option<f64>The power in W.
energy: Option<u64>The energy in Wh since the measurement started.
voltage: Option<f64>The voltage in V.
level: Option<u8>The level of a dimmer or a blind in percent.
humidity: Option<u8>The relative humidity in percent.
alerts: Vec<String>Active alerts, like open or smoke.
Trait Implementations§
impl StructuralPartialEq for Unit
Auto Trait Implementations§
impl Forget for Unit
impl Freeze for Unit
impl Move for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnsafeUnpin for Unit
impl UnwindSafe for Unit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more