smart-house-web: в работе
This commit is contained in:
@@ -52,6 +52,7 @@ impl Thermometer {
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(tag = "type")]
|
||||
pub enum Device {
|
||||
PowerSocket(PowerSocket),
|
||||
Thermometer(Thermometer),
|
||||
@@ -115,4 +116,8 @@ impl House {
|
||||
}
|
||||
output
|
||||
}
|
||||
|
||||
pub fn get_rooms(&self) -> &HashMap<String, Room> {
|
||||
&self.rooms
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user