mirror of
https://github.com/home-assistant/core.git
synced 2026-09-11 10:06:07 -05:00
EZVIZ: Add mac to device info (#85378)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
co-authored by
Franck Nijhof
parent
5000c426c6
commit
1804006da0
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
|
||||
from homeassistant.helpers.entity import DeviceInfo, Entity
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
|
||||
@@ -24,6 +25,9 @@ class EzvizEntity(CoordinatorEntity[EzvizDataUpdateCoordinator], Entity):
|
||||
self._camera_name = self.data["name"]
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, serial)},
|
||||
connections={
|
||||
(CONNECTION_NETWORK_MAC, self.data["mac_address"]),
|
||||
},
|
||||
manufacturer=MANUFACTURER,
|
||||
model=self.data["device_sub_category"],
|
||||
name=self.data["name"],
|
||||
|
||||
Reference in New Issue
Block a user