Enum homie_controller::Event
source · [−]pub enum Event {
DeviceUpdated {
device_id: String,
has_required_attributes: bool,
},
NodeUpdated {
device_id: String,
node_id: String,
has_required_attributes: bool,
},
PropertyUpdated {
device_id: String,
node_id: String,
property_id: String,
has_required_attributes: bool,
},
PropertyValueChanged {
device_id: String,
node_id: String,
property_id: String,
value: String,
fresh: bool,
},
Connected,
}Expand description
An event from a Homie device, either because of a property change or because something new has been discovered.
Variants
DeviceUpdated
A new device has been discovered, or an attribute of the device has been updated.
NodeUpdated
An attribute of a node on a device has been updated.
PropertyUpdated
An attribute of a property on a node has been updated.
PropertyValueChanged
Fields
device_id: Stringnode_id: Stringproperty_id: Stringvalue: StringThe new value.
fresh: boolWhether the new value is fresh, i.e. it has just been sent by the device, as opposed to being the initial value because the controller just connected to the MQTT broker.
The value of a property has changed.
Connected
Connected to the MQTT broker. This could be either the initial connection or a reconnection after the connection was dropped for some reason.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Event
impl UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more