From 2f1c0f8a815b796aafd805e3b40f7d23d29c2088 Mon Sep 17 00:00:00 2001 From: Emmanuel Levijarvi Date: Fri, 17 Oct 2025 13:37:48 -0700 Subject: [PATCH] fix: correct availableEnergyCapacity display unit in periodic_requests example The availableEnergyCapacity field represents energy in Watt-hours (Wh), not a percentage. Updated the display format from '{value}%' to '{value} Wh'. This prevents confusing output like 'Available Energy: 709.0%' which doesn't make sense for a percentage value. --- examples/periodic_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/periodic_requests.py b/examples/periodic_requests.py index cadbbe7..93fc35a 100755 --- a/examples/periodic_requests.py +++ b/examples/periodic_requests.py @@ -75,7 +75,7 @@ def on_device_status(status: DeviceStatus): print(f"\n--- Status Response #{status_count} ---") print(f" Temperature: {status.dhwTemperature:.1f}°F") print(f" Power: {status.currentInstPower:.1f}W") - print(f" Available Energy: {status.availableEnergyCapacity:.1f}%") + print(f" Available Energy: {status.availableEnergyCapacity:.0f} Wh") def on_device_feature(feature: DeviceFeature): """Callback receives parsed DeviceFeature objects."""