Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ONVIF component to SUPPORT_STREAM #22569

Merged
merged 5 commits into from Mar 31, 2019
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion homeassistant/components/onvif/camera.py
Expand Up @@ -13,7 +13,8 @@
from homeassistant.const import (
CONF_NAME, CONF_HOST, CONF_USERNAME, CONF_PASSWORD, CONF_PORT,
ATTR_ENTITY_ID)
from homeassistant.components.camera import Camera, PLATFORM_SCHEMA
from homeassistant.components.camera import (
Camera, PLATFORM_SCHEMA, SUPPORT_STREAM)
from homeassistant.components.camera.const import DOMAIN
from homeassistant.components.ffmpeg import (
DATA_FFMPEG, CONF_EXTRA_ARGUMENTS)
Expand Down Expand Up @@ -228,6 +229,16 @@ async def handle_async_mjpeg_stream(self, request):
finally:
await stream.close()

@property
def supported_features(self):
"""Return supported features."""
return SUPPORT_STREAM

@property
def stream_source(self):
"""Return the stream source."""
return self._input.split(' ')[-1]
hunterjm marked this conversation as resolved.
Show resolved Hide resolved

@property
def name(self):
"""Return the name of this camera."""
Expand Down