Use DeviceInfo in the Shelly RPC entity base class (#143565)

Use DeviceInfo
This commit is contained in:
Maciej Bieniek
2025-04-24 13:49:43 +02:00
committed by GitHub
parent 4bd8c319dd
commit 061a1be2bc

View File

@@ -399,9 +399,9 @@ class ShellyRpcEntity(CoordinatorEntity[ShellyRpcCoordinator]):
"""Initialize Shelly entity.""" """Initialize Shelly entity."""
super().__init__(coordinator) super().__init__(coordinator)
self.key = key self.key = key
self._attr_device_info = { self._attr_device_info = DeviceInfo(
"connections": {(CONNECTION_NETWORK_MAC, coordinator.mac)} connections={(CONNECTION_NETWORK_MAC, coordinator.mac)}
} )
self._attr_unique_id = f"{coordinator.mac}-{key}" self._attr_unique_id = f"{coordinator.mac}-{key}"
self._attr_name = get_rpc_entity_name(coordinator.device, key) self._attr_name = get_rpc_entity_name(coordinator.device, key)