EZVIZ: Add mac to device info (#85378)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
RenierM26
2023-01-07 21:39:15 +02:00
committed by GitHub
parent 5000c426c6
commit 1804006da0

View File

@@ -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"],