This PR changes the structure of most states send to mqtt. Previous iterations had some issues in terms of guaranteeing that relevant datapoints did not move across the structure depending on state. This MR introduces more consistent json structures.
This PR changes the structure of most states send to mqtt. Previous iterations had some issues in terms of guaranteeing that relevant datapoints did not move across the structure depending on state. This MR introduces more consistent json structures.
- fix: use tagged enum serialization for MoistureSensorError and PumpError
- fix: flatten PlantInfo sensors to SensorTelemetry with top-level moisture_pct
- fix: use tagged enum serialization for TankError
- fix: rename TankInfo fields for consistent naming (volume_ml, pct, water_temp_c)
- renamed some fields for better clarity on contained value
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR changes the structure of most states send to mqtt. Previous iterations had some issues in terms of guaranteeing that relevant datapoints did not move across the structure depending on state. This MR introduces more consistent json structures.
@@ -640,3 +640,3 @@let deep_sleep_duration_minutes: u32 =// if battery soc is unknown assume battery has enough changeif matches!(battery_state, BatteryState::Info(data) if data.state_of_charge < 10) {if matches!(battery_state, BatteryState::Info(data) if data.soc_pct.is_some_and(|soc| soc < 10.)) {TODO: check against config, if a battery is to be expected? Eg. with usb power module instead of solar?