diff --git a/src/lib.rs b/src/lib.rs index 7817ac6..710a691 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -41,9 +41,9 @@ struct Config { #[derive(Clone, Copy, Debug, Serialize)] struct Status { /// Current power production (W) - current_w: u32, + current_w: f32, /// Total energy produced since installation (kWh) - total_kwh: u32, + total_kwh: f32, /// Timestamp of last update last_updated: u64, } diff --git a/src/services/my_autarco.rs b/src/services/my_autarco.rs index 24d26d4..2b8b120 100644 --- a/src/services/my_autarco.rs +++ b/src/services/my_autarco.rs @@ -119,8 +119,8 @@ impl super::Service for Service { }; Ok(Status { - current_w: api_power.pv_now, - total_kwh: api_energy.pv_to_date, + current_w: api_power.pv_now as f32, + total_kwh: api_energy.pv_to_date as f32, last_updated, }) }