fix(devices): route mutation PUTs to /2.3 endpoint (partial fix for #102)#108
Merged
Conversation
fulviofreitas
added a commit
that referenced
this pull request
Jul 21, 2026
Collapses three multi-line _update_device() calls back to single lines so they fit within the 100-char line length. Whitespace-only; no semantic change. Unblocks the Lint & Format check on PR #108.
fulviofreitas
marked this pull request as ready for review
July 21, 2026 20:51
This was referenced Jul 21, 2026
Closed
Closed
fulviofreitas
approved these changes
Jul 21, 2026
Collapses three multi-line _update_device() calls back to single lines so they fit within the 100-char line length. Whitespace-only; no semantic change. Unblocks the Lint & Format check on PR #108.
fulviofreitas
force-pushed
the
draft-fix/issue-102-29805143701
branch
from
July 21, 2026 22:55
5e5b67f to
d438477
Compare
Contributor
Author
|
🎉 This PR is included in version 5.0.12 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially closes #102.
Summary
Device-mutation PUTs on
/2.2/networks/{id}/devices/{id}are silently no-ops — the Eero backend returns200 OKbut the change never persists. The/2.3/endpoint processes the same PUT correctly.Adds
DEVICE_UPDATE_ENDPOINT = "https://api-user.e2ro.com/2.3"and a private_update_device()helper. All four device-mutation methods now build absolute 2.3 URLs; reads and all other resources continue to use the 2.2 base URL.What this actually fixes (verified live)
Tested against a real account, this branch vs
master:master(2.2)pause_devicepausedunchangedget_device)set_device_nicknameget_device)set_device_priorityblock_deviceWhat this does NOT fix — separate follow-ups
Verification against a real account revealed that two of the four "silent no-op" mutations are broken for a different reason than the 2.2/2.3 version drift — the payload / field mapping is wrong. These need their own investigation and are being tracked separately:
block_devicesends{blocked: bool}but the device object has noblockedfield (the real field isblacklisted, and blocking uses the dedicated/networks/{id}/blacklistendpoint).prioritizedfield #111 —set_device_prioritysends{prioritized: bool}but the device object has noprioritizedfield at all.BlacklistAPI.add_to_blacklistbug (wrong payload shape:device_idvsmac).Third-party corroboration
The 2.2 → 2.3 device-write drift has been independently reported by three other Eero clients, all with the same fix:
Tests
Adds v2.3 URL-targeting assertions to all four device-mutation tests in
tests/api/test_devices.py. All existing tests pass; CI green after the Black fixup commit.Follow-up refactor (deferred, not blocking)
Discussion during review flagged that a
(host, version)split of the endpoint constants could ergonomically handle future drift. Not scoped here — one data point isn't enough to justify the refactor. Full proposal + trigger conditions logged in.claude/docs/api-endpoint-versioning.md.Original draft opened by the draft-fix workflow; fixup + live-verification + honest scoping done in the current session.