Skip to content

Commit

Permalink
Use Bravia TV MAC address in DeviceInfo.connections (home-assistant…
Browse files Browse the repository at this point in the history
  • Loading branch information
bieniu authored Sep 23, 2024
1 parent ef39ee1 commit 11bb8e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion homeassistant/components/braviatv/entity.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""A entity class for Bravia TV integration."""

from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity

from . import BraviaTVCoordinator
Expand Down Expand Up @@ -28,3 +28,7 @@ def __init__(
model=model,
name=f"{ATTR_MANUFACTURER} {model}",
)
if coordinator.client.mac is not None:
self._attr_device_info["connections"] = {
(CONNECTION_NETWORK_MAC, coordinator.client.mac)
}

0 comments on commit 11bb8e4

Please sign in to comment.