diff --git a/homeassistant/components/camera/__init__.py b/homeassistant/components/camera/__init__.py index afc6be48144..e5ccb433975 100644 --- a/homeassistant/components/camera/__init__.py +++ b/homeassistant/components/camera/__init__.py @@ -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( diff --git a/homeassistant/components/camera/prefs.py b/homeassistant/components/camera/prefs.py index effc2f619bd..1107da2ba38 100644 --- a/homeassistant/components/camera/prefs.py +++ b/homeassistant/components/camera/prefs.py @@ -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.