Simplified device conversions and switched device list to hashmap to allow lookup by name
This commit is contained in:
@@ -23,14 +23,6 @@ impl Device for IkeaOutlet {
|
||||
fn get_identifier(& self) -> &str {
|
||||
&self.zigbee.get_friendly_name()
|
||||
}
|
||||
|
||||
fn as_state_on_off(&mut self) -> Option<&mut dyn StateOnOff> {
|
||||
Some(self)
|
||||
}
|
||||
|
||||
fn as_listener(&mut self) -> Option<&mut dyn Listener> {
|
||||
Some(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user