Don't use unit_of_measurement in state attributes. (#30941)
This commit is contained in:
parent
4b67508330
commit
26fb1ce255
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue