From 26fb1ce25577315a639dae552c3e98cda0a7ef85 Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Sat, 18 Jan 2020 10:03:59 -0500 Subject: [PATCH] Don't use unit_of_measurement in state attributes. (#30941) --- homeassistant/components/zha/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/zha/sensor.py b/homeassistant/components/zha/sensor.py index 987fbf59baf..bb764ab406d 100644 --- a/homeassistant/components/zha/sensor.py +++ b/homeassistant/components/zha/sensor.py @@ -210,7 +210,7 @@ class Battery(Sensor): def async_update_state_attribute(self, key, value): """Update a single device state attribute.""" if key == "battery_voltage": - self._device_state_attributes["voltage"] = f"{round(value/10, 1)}V" + self._device_state_attributes[key] = round(value / 10, 1) self.async_schedule_update_ha_state()