Add MAC adress to devolo Home Network DeviceInfo (#103290)

Add MAC adress to devolo Home Network devices
pull/103297/head
Guido Schmitz 2023-11-03 08:34:49 +01:00 committed by GitHub
parent c81ada16ba
commit f5cc4dcf3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -12,7 +12,7 @@ from devolo_plc_api.device_api import (
from devolo_plc_api.plcnet_api import LogicalNetwork
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
@ -49,6 +49,7 @@ class DevoloEntity(Entity):
self._attr_device_info = DeviceInfo(
configuration_url=f"http://{device.ip}",
connections={(CONNECTION_NETWORK_MAC, device.mac)},
identifiers={(DOMAIN, str(device.serial_number))},
manufacturer="devolo",
model=device.product,

View File

@ -5,6 +5,10 @@
'config_entries': <ANY>,
'configuration_url': 'http://192.0.2.1',
'connections': set({
tuple(
'mac',
'aa:bb:cc:dd:ee:ff',
),
}),
'disabled_by': None,
'entry_type': None,