From c8972a22343bc23b8319dd539ec248c8085a6db1 Mon Sep 17 00:00:00 2001 From: Stefano Angeleri Date: Mon, 14 Apr 2025 12:59:28 +0200 Subject: [PATCH] Fix powerwall display of actual remaining battery, instead of reserved capacity (#142391) --- homeassistant/components/powerwall/sensor.py | 1 - tests/components/powerwall/test_sensor.py | 1 - 2 files changed, 2 deletions(-) diff --git a/homeassistant/components/powerwall/sensor.py b/homeassistant/components/powerwall/sensor.py index b4988133727..f242d2c67e6 100644 --- a/homeassistant/components/powerwall/sensor.py +++ b/homeassistant/components/powerwall/sensor.py @@ -297,7 +297,6 @@ class PowerWallBackupReserveSensor(PowerWallEntity, SensorEntity): _attr_translation_key = "backup_reserve" _attr_state_class = SensorStateClass.MEASUREMENT _attr_native_unit_of_measurement = PERCENTAGE - _attr_device_class = SensorDeviceClass.BATTERY @property def unique_id(self) -> str: diff --git a/tests/components/powerwall/test_sensor.py b/tests/components/powerwall/test_sensor.py index 9b533304fbc..7f23550f522 100644 --- a/tests/components/powerwall/test_sensor.py +++ b/tests/components/powerwall/test_sensor.py @@ -118,7 +118,6 @@ async def test_sensors(hass: HomeAssistant, device_registry: dr.DeviceRegistry) expected_attributes = { "unit_of_measurement": PERCENTAGE, "friendly_name": "MySite Backup reserve", - "device_class": "battery", } # Only test for a subset of attributes in case # HA changes the implementation and a new one appears