Record received consumption from inverter
This commit is contained in:
@ -255,6 +255,18 @@ impl AppConfig {
|
||||
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())
|
||||
}
|
||||
|
||||
/// Get energy consumption history path
|
||||
pub fn energy_consumption_history(&self) -> PathBuf {
|
||||
self.storage_path().join("consumption_history")
|
||||
}
|
||||
|
||||
/// Get energy consumption history file path for a given day
|
||||
pub fn energy_consumption_history_day(&self, number: u64) -> PathBuf {
|
||||
self.storage_path()
|
||||
.join("consumption_history")
|
||||
.join(number.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Reference in New Issue
Block a user