Metric template tempo added

feature/1126
prplV 2025-03-05 13:32:55 +03:00
parent f6ad632c2d
commit 5e8eadac9b
1 changed files with 10 additions and 0 deletions

View File

@ -160,6 +160,16 @@ pub mod v3 {
pub json_type : String,
pub addr : String,
}
impl Metric {
pub fn template() -> Self {
Self {
id : "room_tempo".to_string(),
json_type : "String".to_string(),
addr : "flat1.room1.rt_tempo".to_string(),
}
}
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct Metrics {
pub name : String,