From 31855009335d8c20b7aae296a214404724e014bc Mon Sep 17 00:00:00 2001 From: Stefan Slivinski Date: Thu, 30 Apr 2026 10:12:03 -0700 Subject: [PATCH] feat(sensor): show battery voltage to 1 decimal place The API returns battery voltage with multiple decimals (e.g. 13.74321) which makes the dashboard look noisy. Add suggested_display_precision = 1 so HA rounds the displayed value to 1 decimal while keeping the full value in state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- custom_components/generac/sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/generac/sensor.py b/custom_components/generac/sensor.py index a88dd34..378186f 100644 --- a/custom_components/generac/sensor.py +++ b/custom_components/generac/sensor.py @@ -285,6 +285,7 @@ class BatteryVoltageSensor(GeneracEntity, SensorEntity): device_class = SensorDeviceClass.VOLTAGE native_unit_of_measurement = UnitOfElectricPotential.VOLT + suggested_display_precision = 1 @property def name(self):