track firmware versions

This commit is contained in:
Robin Appelman 2022-02-13 17:00:50 +01:00
commit d6acb68602
4 changed files with 26 additions and 12 deletions

View file

@ -8,6 +8,7 @@ pub enum Topic {
Sensor(Device),
Result(Device),
Other(String),
Status(Device),
}
impl From<&str> for Topic {
@ -25,6 +26,8 @@ impl From<&str> for Topic {
("stat", "POWER") => Topic::Power(device),
("tele", "SENSOR") => Topic::Sensor(device),
("stat", "RESULT") => Topic::Result(device),
("stat", "STATUS") => Topic::Status(device),
("stat", "STATUS2") => Topic::Status(device),
_ => Topic::Other(raw.to_string()),
}
} else {