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

pull/76245/head
Diogo Gomes 2022-08-04 18:36:37 +01:00 committed by Franck Nijhof
parent 5c9d557b10
commit 6340da72a5
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 1 additions and 0 deletions

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: