mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Use DeviceInfo in the Shelly RPC entity base class (#143565)
Use DeviceInfo
This commit is contained in:
parent
4bd8c319dd
commit
061a1be2bc
@ -399,9 +399,9 @@ class ShellyRpcEntity(CoordinatorEntity[ShellyRpcCoordinator]):
|
||||
"""Initialize Shelly entity."""
|
||||
super().__init__(coordinator)
|
||||
self.key = key
|
||||
self._attr_device_info = {
|
||||
"connections": {(CONNECTION_NETWORK_MAC, coordinator.mac)}
|
||||
}
|
||||
self._attr_device_info = DeviceInfo(
|
||||
connections={(CONNECTION_NETWORK_MAC, coordinator.mac)}
|
||||
)
|
||||
self._attr_unique_id = f"{coordinator.mac}-{key}"
|
||||
self._attr_name = get_rpc_entity_name(coordinator.device, key)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user