Subsystem 4e: Per-device unreachable status (switches/alarms/storage, inline)#36
Merged
Conversation
…tators) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…achability Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…/FR) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Subsystem 4e — Per-Device Unreachable Status
Adds a persisted, three-way per-device reachability axis to the three managed smart-device types — switches, alarms, storage monitors — surfaced inline on each device's embed.
DeviceReachability:Reachable·Removed(entity destroyed —not_found) ·NoPrivilege(token lost building access —access_denied) ·NoResponse(timeout / other).How it works
ReachabilityMapping.FromResponsetranslatesRustPlusErrorCode→DeviceReachability(sealed insideFeatures.Connections; the protocol enum never leaks past it).DeviceReading/StorageReading(payload + reachability); switch actuation returnsDeviceReachability.DeviceReachabilityChangedEventper device; a periodicPollReachabilityAsyncloop publishes on change (ReachabilityPollInterval, default 5 min); switch actuation publishes on failure. Also fixes a latent prime bug where a removed switch/alarm was silently primed as "off".Reachabilitycolumn on the three entities (migrationDeviceReachability, additive, defaultReachable).Verification
-warnaserrorwith 0 warnings;jb cleanupcode --profile=ReformatAndReorderclean; localization parity 248 → 260 (+12 EN/FR keys).Notes
#unreachable-deviceschannel — per the catalog's C3/C4 "prefer inline status, keep a channel only if it earns it".LastIsActive). The naive fix would wrongly enable Refresh during a real server-down, so the correct fix (relay re-fetches contents on recovery) is worth its own small slice.🤖 Generated with Claude Code