Use EntityFeature enum in components (v**) (#69465)
* Use EntityFeature enum in vallox * Use EntityFeature enum in velbus * Use EntityFeature enum in velux * Use EntityFeature enum in venstar * Use EntityFeature enum in vera * Use EntityFeature enum in verisure * Use EntityFeature enum in vesync * Use EntityFeature enum in vicare * Use EntityFeature enum in vivotek * Use EntityFeature enum in vizio * Use EntityFeature enum in vlc * Use EntityFeature enum in vlc_telnet * Use EntityFeature enum in volumio
This commit is contained in:
parent
10a1b1f734
commit
f194f7809b
15 changed files with 128 additions and 186 deletions
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||
from libpyvivotek import VivotekCamera
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.camera import PLATFORM_SCHEMA, SUPPORT_STREAM, Camera
|
||||
from homeassistant.components.camera import PLATFORM_SCHEMA, Camera, CameraEntityFeature
|
||||
from homeassistant.const import (
|
||||
CONF_AUTHENTICATION,
|
||||
CONF_IP_ADDRESS,
|
||||
|
@ -76,6 +76,8 @@ def setup_platform(
|
|||
class VivotekCam(Camera):
|
||||
"""A Vivotek IP camera."""
|
||||
|
||||
_attr_supported_features = CameraEntityFeature.STREAM
|
||||
|
||||
def __init__(self, config, cam, stream_source):
|
||||
"""Initialize a Vivotek camera."""
|
||||
super().__init__()
|
||||
|
@ -87,11 +89,6 @@ class VivotekCam(Camera):
|
|||
self._name = config[CONF_NAME]
|
||||
self._stream_source = stream_source
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Return supported features for this camera."""
|
||||
return SUPPORT_STREAM
|
||||
|
||||
@property
|
||||
def frame_interval(self):
|
||||
"""Return the interval between frames of the mjpeg stream."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue