Cleanup supported_features default values (#82306)
This commit is contained in:
parent
7b4d4d11ac
commit
b166a6d88b
3 changed files with 6 additions and 9 deletions
|
@ -96,9 +96,8 @@ class DoorBirdCamera(DoorBirdEntity, Camera):
|
||||||
self._stream_url = stream_url
|
self._stream_url = stream_url
|
||||||
self._attr_name = name
|
self._attr_name = name
|
||||||
self._last_image: bytes | None = None
|
self._last_image: bytes | None = None
|
||||||
self._attr_supported_features = (
|
if self._stream_url:
|
||||||
CameraEntityFeature.STREAM if self._stream_url else 0
|
self._attr_supported_features = CameraEntityFeature.STREAM
|
||||||
)
|
|
||||||
self._interval = interval
|
self._interval = interval
|
||||||
self._last_update = datetime.datetime.min
|
self._last_update = datetime.datetime.min
|
||||||
self._attr_unique_id = f"{self._mac_addr}_{camera_id}"
|
self._attr_unique_id = f"{self._mac_addr}_{camera_id}"
|
||||||
|
|
|
@ -321,9 +321,8 @@ class EvoController(EvoClimateEntity):
|
||||||
self._attr_preset_modes = [
|
self._attr_preset_modes = [
|
||||||
TCS_PRESET_TO_HA[m] for m in modes if m in list(TCS_PRESET_TO_HA)
|
TCS_PRESET_TO_HA[m] for m in modes if m in list(TCS_PRESET_TO_HA)
|
||||||
]
|
]
|
||||||
self._attr_supported_features = (
|
if self._attr_preset_modes:
|
||||||
ClimateEntityFeature.PRESET_MODE if self._attr_preset_modes else 0
|
self._attr_supported_features = ClimateEntityFeature.PRESET_MODE
|
||||||
)
|
|
||||||
|
|
||||||
async def async_tcs_svc_request(self, service: str, data: dict[str, Any]) -> None:
|
async def async_tcs_svc_request(self, service: str, data: dict[str, Any]) -> None:
|
||||||
"""Process a service request (system mode) for a controller.
|
"""Process a service request (system mode) for a controller.
|
||||||
|
|
|
@ -165,9 +165,8 @@ class GenericCamera(Camera):
|
||||||
self._stream_source.hass = hass
|
self._stream_source.hass = hass
|
||||||
self._limit_refetch = device_info[CONF_LIMIT_REFETCH_TO_URL_CHANGE]
|
self._limit_refetch = device_info[CONF_LIMIT_REFETCH_TO_URL_CHANGE]
|
||||||
self._attr_frame_interval = 1 / device_info[CONF_FRAMERATE]
|
self._attr_frame_interval = 1 / device_info[CONF_FRAMERATE]
|
||||||
self._attr_supported_features = (
|
if self._stream_source:
|
||||||
CameraEntityFeature.STREAM if self._stream_source else 0
|
self._attr_supported_features = CameraEntityFeature.STREAM
|
||||||
)
|
|
||||||
self.content_type = device_info[CONF_CONTENT_TYPE]
|
self.content_type = device_info[CONF_CONTENT_TYPE]
|
||||||
self.verify_ssl = device_info[CONF_VERIFY_SSL]
|
self.verify_ssl = device_info[CONF_VERIFY_SSL]
|
||||||
if device_info.get(CONF_RTSP_TRANSPORT):
|
if device_info.get(CONF_RTSP_TRANSPORT):
|
||||||
|
|
Loading…
Add table
Reference in a new issue