From dd861d7d1cfcf81eb2d432cfd5263a198d0c96a1 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 3 Aug 2025 08:12:19 -0400 Subject: [PATCH] Enhancement: handle evcc 0.207 breaking change (#5619) --- src/widgets/evcc/component.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/widgets/evcc/component.jsx b/src/widgets/evcc/component.jsx index d0debdc3d..4f08d7329 100644 --- a/src/widgets/evcc/component.jsx +++ b/src/widgets/evcc/component.jsx @@ -29,17 +29,20 @@ export default function Component({ service }) { ); } + // evcc v0.207 changed the API structure so its no longer under 'result' + const data = stateData.result ?? stateData; + // broken by evcc v0.133.0 https://github.com/evcc-io/evcc/commit/9dcb1fa0a7c08dd926b79309aa1f676a5fc6c8aa - const gridPower = stateData.result.gridPower ?? stateData.result.grid?.power ?? 0; + const gridPower = data.gridPower ?? data.grid?.power ?? 0; return ( - + - + );