diff --git a/homeassistant/components/shelly/button.py b/homeassistant/components/shelly/button.py index 281c4a25d04..2619924201a 100644 --- a/homeassistant/components/shelly/button.py +++ b/homeassistant/components/shelly/button.py @@ -21,7 +21,6 @@ from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import entity_registry as er from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback -from homeassistant.helpers.entity_registry import RegistryEntry from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import ( @@ -359,9 +358,6 @@ class ShellyBluTrvButton(ShellyRpcAttributeEntity, ButtonEntity): config, ble_addr, coordinator.mac, fw_ver ) - if hasattr(self, "_attr_name") and description.role != ROLE_GENERIC: - delattr(self, "_attr_name") - @rpc_call async def async_press(self) -> None: """Triggers the Shelly button press service.""" @@ -374,19 +370,6 @@ class RpcVirtualButton(ShellyRpcAttributeEntity, ButtonEntity): entity_description: RpcButtonDescription _id: int - def __init__( - self, - coordinator: ShellyRpcCoordinator, - key: str, - attribute: str, - description: RpcButtonDescription, - ) -> None: - """Initialize select.""" - super().__init__(coordinator, key, attribute, description) - - if hasattr(self, "_attr_name") and description.role != ROLE_GENERIC: - delattr(self, "_attr_name") - @rpc_call async def async_press(self) -> None: """Triggers the Shelly button press service.""" @@ -401,20 +384,6 @@ class RpcSleepingSmokeMuteButton(ShellySleepingRpcAttributeEntity, ButtonEntity) entity_description: RpcButtonDescription - def __init__( - self, - coordinator: ShellyRpcCoordinator, - key: str, - attribute: str, - description: RpcButtonDescription, - 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") - @rpc_call async def async_press(self) -> None: """Triggers the Shelly button press service."""