smart-house-web: в работе

This commit is contained in:
5 changed files with 49 additions and 1 deletions

View File

@@ -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
}
}