Remove Shelly redundant device info assignment in Button class (#149469)

This commit is contained in:
Shay Levy 2025-07-26 14:32:51 +03:00 committed by GitHub
parent e1501d7510
commit 5aa0d0dc81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,6 @@ from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.util import slugify from homeassistant.util import slugify
@ -251,9 +250,6 @@ class ShellyButton(ShellyBaseButton):
coordinator.model_name, coordinator.model_name,
suggested_area=coordinator.suggested_area, suggested_area=coordinator.suggested_area,
) )
self._attr_device_info = DeviceInfo(
connections={(CONNECTION_NETWORK_MAC, coordinator.mac)}
)
async def _press_method(self) -> None: async def _press_method(self) -> None:
"""Press method.""" """Press method."""