1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Remove Shelly update name removal (#157073)

Signed-off-by: David Rapan <david@rapan.cz>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
This commit is contained in:
David Rapan
2025-11-24 17:02:23 +01:00
committed by GitHub
parent 5a8ddcd0b3
commit 3d459704e1

View File

@@ -23,7 +23,6 @@ from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.entity_registry import RegistryEntry
from homeassistant.helpers.restore_state import RestoreEntity
from .const import (
@@ -182,9 +181,6 @@ class RestUpdateEntity(ShellyRestAttributeEntity, UpdateEntity):
)
self._in_progress_old_version: str | None = None
if hasattr(self, "_attr_name"):
delattr(self, "_attr_name")
@property
def installed_version(self) -> str | None:
"""Version currently in use."""
@@ -278,9 +274,6 @@ class RpcUpdateEntity(ShellyRpcAttributeEntity, UpdateEntity):
coordinator.device.gen, coordinator.model, description.beta
)
if hasattr(self, "_attr_name"):
delattr(self, "_attr_name")
async def async_added_to_hass(self) -> None:
"""When entity is added to hass."""
await super().async_added_to_hass()
@@ -376,20 +369,6 @@ class RpcSleepingUpdateEntity(
entity_description: RpcUpdateDescription
def __init__(
self,
coordinator: ShellyRpcCoordinator,
key: str,
attribute: str,
description: RpcUpdateDescription,
entry: RegistryEntry | None = None,
) -> None:
"""Initialize the sleeping sensor."""
super().__init__(coordinator, key, attribute, description, entry)
if hasattr(self, "_attr_name"):
delattr(self, "_attr_name")
async def async_added_to_hass(self) -> None:
"""Handle entity which will be added."""
await super().async_added_to_hass()