Skip to content

Handle DELETE /user/scene/{id} so app routine deletion persists - #107

Merged
Lash-L merged 2 commits into
Python-roborock:mainfrom
Ahmed-max:fix-routine-deletion
Sep 27, 2026
Merged

Lash-L merged 2 commits into
Python-roborock:mainfrom
Ahmed-max:fix-routine-deletion

Conversation

@Ahmed-max

Copy link
Copy Markdown
Contributor

Handle DELETE /user/scene/{id}

Deleting a routine in the Roborock app didn't persist. The app sends DELETE /user/scene/{id}, but no rule matched it, so the request fell through to the catchall. The catchall returned {"ok": true} without changing the inventory, so the routine came back on the next refresh.

Changes

  • Add delete_scene in routes/user/scene/service.py. It removes the scene from scenes, home_scenes and scene_order.
  • Add a DELETE-only matcher and builder in routes/user/scene/item.py, and register the delete_scene rule in endpoint_rules.py.
  • Deleting an unknown id returns success, so repeated deletes are safe.

Testing

  • Added tests/test_scene_delete.py; uv run pytest -q passes.
  • Verified with the Roborock Android app on the HA add-on: deleted routines stay deleted.

Comment thread tests/test_scene_delete.py Outdated
@Lash-L
Lash-L merged commit 71635da into Python-roborock:main Sep 27, 2026
3 checks passed
@Lash-L

Lash-L commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

TY @Ahmed-max!

@Lash-L Lash-L mentioned this pull request Sep 27, 2026
@Croydon Croydon mentioned this pull request Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants