Repository navigation
Description
Current status (17 October 2026)
The shared DND builder and HA switch/time controls are implemented. A live DND off/on roundtrip matched API readback, preserving both raw clock boundaries and LED. validate_dnd.py supports switch-only restoration. Actual firing and DST/date-boundary acceptance remain in #21/#42.
Delivered: implementation/contracts and dedicated validation tooling. PR #43 consolidates the fixes, 666 passing tests on HA 2026.10.1/2026.3.0, strict mypy/Ruff and the coverage guide. This implementation ticket closes on merge; outstanding external acceptance is explicitly retained in #42, with #21/#22/#41 covering their separate work. Closing this ticket does not certify unperformed physical/app tests.
Historical audit and earlier development notes
Both the DND switch and time entities write switch_dnd; the inspected app request writes switch and also carries led. The API read-state name need not be the API write-field name. Whether led is mandatory or aliases are accepted is not yet known.
APK evidence
view/tabs/device/device_setting/indicator_light_time/indicator_light_time_controller.dart, IndicatorLightTimeController::saveIndcatorTime: 0xcc7054 inserts led, 0xcc7078 / 0xcc709c insert DND times, 0xcc70c0 inserts user_device_id, and the litter-box branch inserts switch at 0xcc7104 before POST /device/litter_box/set_dnd (0xcc7110, 0xcc717c).
Evidence source: NOTTY Smart Pet 1.1.30, SHA-256 3b6dc21037f2802e92233ecd9f685e76b03a79afa2d82dd52a5dfcd689a18e6a, decoded locally with Blutter. These are inspected request-construction paths, not just URL-string matches. Decoded app files and private captures remain outside the public repository.
Integration baseline
switch.py at commit 9b1b7c3.
Acceptance criteria
- Trace the switch value and LED closure to establish exact types and preservation rules.
- Use a shared APK-backed request builder for switch and time updates; retain
switch_dndas the read-state field where appropriate. - Preserve the other DND time and any required LED state rather than overwriting unrelated settings.
- Cover enable/disable and start/end edits with synthetic contract tests, then validate resulting state with the owner.
Related command validation: #4.
Validation boundary
The request-key mismatch is established statically. Server alias acceptance and physical effects have not been established by this APK review.
No hardware actions or cloud-setting changes were performed while creating this issue.
Activity