mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Cleanup camera after late PR review (#77880)
Cleanup changes to camera from #77439
This commit is contained in:
parent
e5ac50fc57
commit
34da463df0
@ -893,10 +893,11 @@ async def websocket_update_prefs(
|
||||
entity_id = changes.pop("entity_id")
|
||||
try:
|
||||
entity_prefs = await prefs.async_update(entity_id, **changes)
|
||||
connection.send_result(msg["id"], entity_prefs)
|
||||
except HomeAssistantError as ex:
|
||||
_LOGGER.error("Error setting camera preferences: %s", ex)
|
||||
connection.send_error(msg["id"], "update_failed", str(ex))
|
||||
else:
|
||||
connection.send_result(msg["id"], entity_prefs)
|
||||
|
||||
|
||||
async def async_handle_snapshot_service(
|
||||
|
@ -68,7 +68,8 @@ class CameraPreferences:
|
||||
) -> dict[str, bool | int]:
|
||||
"""Update camera preferences.
|
||||
|
||||
Returns a dict with the preferences on success or a string on error.
|
||||
Returns a dict with the preferences on success.
|
||||
Raises HomeAssistantError on failure.
|
||||
"""
|
||||
if preload_stream is not UNDEFINED:
|
||||
# Prefs already initialized.
|
||||
|
Loading…
x
Reference in New Issue
Block a user