fix: restore reads the options the web UI ticks

The web UI sends the restore options as the form field "data". The
param helpers looked up query parameters only, so /restore never saw
them and restored the shades alone, since 3.0.0. The helpers now take a
form field too.

/restore uses an upload once, and drops the file when the options aren't
JSON.

e2e: test_restore.py, a probe that the field is read and, with --reboot,
a settings-only round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-28 21:02:39 +01:00
parent 0ee52d6d9f
commit 3d45ba59c1
8 changed files with 97 additions and 18 deletions

View file

@ -18,7 +18,7 @@ def pytest_addoption(parser):
parser.addoption("--radio", action="store_true", help="also run the tests that send commands on air")
parser.addoption("--shade", type=int, default=None, help="with --radio: the id of the shade the commands may move")
parser.addoption("--edit", action="store_true", help="also run the edits that change the shade model, then undo them")
parser.addoption("--reboot", action="store_true", help="also run the test that reboots the device")
parser.addoption("--reboot", action="store_true", help="also run the tests that reboot the device")
parser.addoption("--lockout", action="store_true", help="also run the test that locks this PC out of /login for 30 s")