Skip to content

Commit 3a2ec4e

Browse files
committed
Remove delattr(self, "_attr_name")
Signed-off-by: David Rapan <[email protected]>
1 parent 2e82ac8 commit 3a2ec4e

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

homeassistant/components/shelly/update.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from homeassistant.core import HomeAssistant, callback
2424
from homeassistant.exceptions import HomeAssistantError
2525
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
26-
from homeassistant.helpers.entity_registry import RegistryEntry
2726
from homeassistant.helpers.restore_state import RestoreEntity
2827

2928
from .const import (
@@ -182,9 +181,6 @@ def __init__(
182181
)
183182
self._in_progress_old_version: str | None = None
184183

185-
if hasattr(self, "_attr_name"):
186-
delattr(self, "_attr_name")
187-
188184
@property
189185
def installed_version(self) -> str | None:
190186
"""Version currently in use."""
@@ -278,9 +274,6 @@ def __init__(
278274
coordinator.device.gen, coordinator.model, description.beta
279275
)
280276

281-
if hasattr(self, "_attr_name"):
282-
delattr(self, "_attr_name")
283-
284277
async def async_added_to_hass(self) -> None:
285278
"""When entity is added to hass."""
286279
await super().async_added_to_hass()
@@ -376,20 +369,6 @@ class RpcSleepingUpdateEntity(
376369

377370
entity_description: RpcUpdateDescription
378371

379-
def __init__(
380-
self,
381-
coordinator: ShellyRpcCoordinator,
382-
key: str,
383-
attribute: str,
384-
description: RpcUpdateDescription,
385-
entry: RegistryEntry | None = None,
386-
) -> None:
387-
"""Initialize the sleeping sensor."""
388-
super().__init__(coordinator, key, attribute, description, entry)
389-
390-
if hasattr(self, "_attr_name"):
391-
delattr(self, "_attr_name")
392-
393372
async def async_added_to_hass(self) -> None:
394373
"""Handle entity which will be added."""
395374
await super().async_added_to_hass()

0 commit comments

Comments
 (0)