mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Handle LinkPlay devices with no mac (#136272)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
2617575e18
commit
b682495fda
@ -44,9 +44,15 @@ class LinkPlayBaseEntity(Entity):
|
|||||||
if model != MANUFACTURER_GENERIC:
|
if model != MANUFACTURER_GENERIC:
|
||||||
model_id = bridge.device.properties["project"]
|
model_id = bridge.device.properties["project"]
|
||||||
|
|
||||||
|
connections: set[tuple[str, str]] = set()
|
||||||
|
if "MAC" in bridge.device.properties:
|
||||||
|
connections.add(
|
||||||
|
(dr.CONNECTION_NETWORK_MAC, bridge.device.properties["MAC"])
|
||||||
|
)
|
||||||
|
|
||||||
self._attr_device_info = dr.DeviceInfo(
|
self._attr_device_info = dr.DeviceInfo(
|
||||||
configuration_url=bridge.endpoint,
|
configuration_url=bridge.endpoint,
|
||||||
connections={(dr.CONNECTION_NETWORK_MAC, bridge.device.properties["MAC"])},
|
connections=connections,
|
||||||
hw_version=bridge.device.properties["hardware"],
|
hw_version=bridge.device.properties["hardware"],
|
||||||
identifiers={(DOMAIN, bridge.device.uuid)},
|
identifiers={(DOMAIN, bridge.device.uuid)},
|
||||||
manufacturer=manufacturer,
|
manufacturer=manufacturer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user