Delete relay energy information
This commit is contained in:
@ -315,6 +315,12 @@ impl DevicesList {
|
||||
.into());
|
||||
}
|
||||
|
||||
// Delete relay energy information
|
||||
let stats_dir = AppConfig::get().relay_runtime_stats_dir(relay_id);
|
||||
if stats_dir.is_dir() {
|
||||
std::fs::remove_dir_all(stats_dir)?;
|
||||
}
|
||||
|
||||
// Delete the relay
|
||||
let device = self
|
||||
.relay_get_device(relay_id)
|
||||
|
Reference in New Issue
Block a user