Skip to content

Commit

Permalink
Handle LinkPlay devices with no mac (#136272)
Browse files Browse the repository at this point in the history
Co-authored-by: J. Nick Koston <[email protected]>
  • Loading branch information
silamon and bdraco authored Jan 23, 2025
1 parent 2617575 commit b682495
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion homeassistant/components/linkplay/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ def __init__(self, bridge: LinkPlayBridge) -> None:
if model != MANUFACTURER_GENERIC:
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(
configuration_url=bridge.endpoint,
connections={(dr.CONNECTION_NETWORK_MAC, bridge.device.properties["MAC"])},
connections=connections,
hw_version=bridge.device.properties["hardware"],
identifiers={(DOMAIN, bridge.device.uuid)},
manufacturer=manufacturer,
Expand Down

0 comments on commit b682495

Please sign in to comment.