Use EntityFeature enums in mobile_app (#69592)

This commit is contained in:
epenet 2022-04-07 18:01:19 +02:00 committed by GitHub
parent 10ed9cfdf2
commit d56f6f39c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ from homeassistant.components import camera, cloud, notify as hass_notify, tag
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES as BINARY_SENSOR_CLASSES,
)
from homeassistant.components.camera import SUPPORT_STREAM as CAMERA_SUPPORT_STREAM
from homeassistant.components.camera import CameraEntityFeature
from homeassistant.components.device_tracker import (
ATTR_BATTERY,
ATTR_GPS,
@ -297,7 +297,7 @@ async def webhook_stream_camera(hass, config_entry, data):
resp = {"mjpeg_path": f"/api/camera_proxy_stream/{camera_state.entity_id}"}
if camera_state.attributes[ATTR_SUPPORTED_FEATURES] & CAMERA_SUPPORT_STREAM:
if camera_state.attributes[ATTR_SUPPORTED_FEATURES] & CameraEntityFeature.STREAM:
try:
resp["hls_path"] = await camera.async_request_stream(
hass, camera_state.entity_id, "hls"