Delete relay energy information

This commit is contained in:
2024-09-17 22:42:24 +02:00
parent 565db05fb0
commit 92878e6548
4 changed files with 27 additions and 6 deletions

View File

@ -241,11 +241,15 @@ impl AppConfig {
self.storage_path().join("relays_runtime")
}
/// Get relay runtime stats path for a given day
pub fn relay_runtime_file_path(&self, relay_id: DeviceRelayID, day: u64) -> PathBuf {
/// Get relay runtime stats path for a given relay
pub fn relay_runtime_stats_dir(&self, relay_id: DeviceRelayID) -> PathBuf {
self.relays_runtime_stats_storage_path()
.join(relay_id.0.to_string())
.join(day.to_string())
}
/// Get relay runtime stats path for a given relay for a given day
pub fn relay_runtime_day_file_path(&self, relay_id: DeviceRelayID, day: u64) -> PathBuf {
self.relay_runtime_stats_dir(relay_id).join(day.to_string())
}
}