|
10 | 10 | from haffmpeg.camera import CameraMjpeg
|
11 | 11 | from haffmpeg.tools import IMAGE_JPEG, ImageFrame
|
12 | 12 | from homeassistant.components import mqtt
|
13 |
| -from homeassistant.components.camera import (SUPPORT_ON_OFF, SUPPORT_STREAM, |
14 |
| - Camera) |
| 13 | +from homeassistant.components.camera import (Camera, CameraEntityFeature) |
15 | 14 | from homeassistant.components.ffmpeg import CONF_EXTRA_ARGUMENTS, DATA_FFMPEG
|
16 | 15 | from homeassistant.config_entries import ConfigEntry
|
17 | 16 | from homeassistant.const import (CONF_HOST, CONF_MAC, CONF_NAME, CONF_PASSWORD,
|
@@ -176,9 +175,9 @@ async def async_will_remove_from_hass(self):
|
176 | 175 | self._mqtt_subscription()
|
177 | 176 |
|
178 | 177 | @property
|
179 |
| - def supported_features(self) -> int: |
| 178 | + def supported_features(self) -> CameraEntityFeature: |
180 | 179 | """Return supported features."""
|
181 |
| - return SUPPORT_STREAM | SUPPORT_ON_OFF |
| 180 | + return CameraEntityFeature.STREAM | CameraEntityFeature.ON_OFF |
182 | 181 |
|
183 | 182 | def turn_off(self):
|
184 | 183 | """Turn off camera"""
|
@@ -500,9 +499,9 @@ async def async_will_remove_from_hass(self):
|
500 | 499 | self._mqtt_image_subscription()
|
501 | 500 |
|
502 | 501 | @property
|
503 |
| - def supported_features(self) -> int: |
| 502 | + def supported_features(self) -> CameraEntityFeature: |
504 | 503 | """Return supported features."""
|
505 |
| - return SUPPORT_STREAM | SUPPORT_ON_OFF |
| 504 | + return CameraEntityFeature.STREAM | CameraEntityFeature.ON_OFF |
506 | 505 |
|
507 | 506 | def turn_off(self):
|
508 | 507 | """Turn off camera"""
|
|
0 commit comments