Add device info to generic camera (#103715)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
0a84c2dba6
commit
fe15ed4a28
1 changed files with 6 additions and 0 deletions
|
@ -33,6 +33,7 @@ from homeassistant.const import (
|
|||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import TemplateError
|
||||
from homeassistant.helpers import config_validation as cv, template as template_helper
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.httpx_client import get_async_client
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
@ -172,6 +173,11 @@ class GenericCamera(Camera):
|
|||
self._last_url = None
|
||||
self._last_image = None
|
||||
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, identifier)},
|
||||
manufacturer="Generic",
|
||||
)
|
||||
|
||||
@property
|
||||
def use_stream_for_stills(self) -> bool:
|
||||
"""Whether or not to use stream to generate stills."""
|
||||
|
|
Loading…
Add table
Reference in a new issue