mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +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."""
|
"""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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user