Remove icon attribute if device class is set (#76161)

This commit is contained in:
Diogo Gomes 2022-08-04 18:36:37 +01:00 committed by GitHub
parent 91486f2d61
commit 8ca5b5d4a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,6 +223,7 @@ class IntegrationSensor(RestoreEntity, SensorEntity):
== SensorDeviceClass.POWER
):
self._attr_device_class = SensorDeviceClass.ENERGY
self._attr_icon = None
update_state = True
if update_state: