mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Remove Shelly redundant device info assignment in Button class (#149469)
This commit is contained in:
parent
e1501d7510
commit
5aa0d0dc81
@ -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."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user