mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Add device info to generic camera (#103715)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
0a84c2dba6
commit
fe15ed4a28
@ -33,6 +33,7 @@ from homeassistant.const import (
|
|||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import TemplateError
|
from homeassistant.exceptions import TemplateError
|
||||||
from homeassistant.helpers import config_validation as cv, template as template_helper
|
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.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.helpers.httpx_client import get_async_client
|
from homeassistant.helpers.httpx_client import get_async_client
|
||||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||||
@ -172,6 +173,11 @@ class GenericCamera(Camera):
|
|||||||
self._last_url = None
|
self._last_url = None
|
||||||
self._last_image = None
|
self._last_image = None
|
||||||
|
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
|
identifiers={(DOMAIN, identifier)},
|
||||||
|
manufacturer="Generic",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def use_stream_for_stills(self) -> bool:
|
def use_stream_for_stills(self) -> bool:
|
||||||
"""Whether or not to use stream to generate stills."""
|
"""Whether or not to use stream to generate stills."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user