refactor: move PumpInfo struct to mqtt module

This commit is contained in:
2026-05-10 02:38:43 +02:00
parent a02b84d732
commit 271c1a1383
2 changed files with 16 additions and 15 deletions

View File

@@ -115,19 +115,6 @@ struct LightState {
is_day: bool,
}
#[derive(Serialize, Deserialize, Debug, PartialEq, Default)]
///mqtt struct to track pump activities
struct PumpInfo {
enabled: bool,
pump_ineffective: bool,
median_current_ma: u16,
max_current_ma: u16,
min_current_ma: u16,
error: String,
flow_raw: u32,
flow_ml: f32,
}
#[derive(Serialize)]
pub struct PumpResult {
median_current_ma: u16,
@@ -1033,7 +1020,7 @@ async fn pump_info(
flow_raw: u32,
flow_ml: f32,
) {
let pump_info = PumpInfo {
let pump_info = mqtt::PumpInfo {
enabled: pump_active,
pump_ineffective,
median_current_ma,