Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion homeassistant/components/camera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/components/camera/prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ async def async_update(
) -> 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.
Expand Down