mirror of
https://github.com/home-assistant/core.git
synced 2025-09-06 05:11:35 +02:00
Add MAC address to Modern forms devices (#150698)
This commit is contained in:
committed by
GitHub
parent
61de50dfc0
commit
f72f2a326a
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
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 homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
@@ -31,6 +31,9 @@ class ModernFormsDeviceEntity(CoordinatorEntity[ModernFormsDataUpdateCoordinator
|
|||||||
"""Return device information about this Modern Forms device."""
|
"""Return device information about this Modern Forms device."""
|
||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
identifiers={(DOMAIN, self.coordinator.data.info.mac_address)},
|
identifiers={(DOMAIN, self.coordinator.data.info.mac_address)},
|
||||||
|
connections={
|
||||||
|
(CONNECTION_NETWORK_MAC, self.coordinator.data.info.mac_address)
|
||||||
|
},
|
||||||
name=self.coordinator.data.info.device_name,
|
name=self.coordinator.data.info.device_name,
|
||||||
manufacturer="Modern Forms",
|
manufacturer="Modern Forms",
|
||||||
model=self.coordinator.data.info.fan_type,
|
model=self.coordinator.data.info.fan_type,
|
||||||
|
Reference in New Issue
Block a user