feat(read): rich device detail + get_dependencies + get_device_group - #36
Merged
Conversation
- get_device_by_id now returns the full states dict (enum-dup keys dropped) plus curated subclass attributes: battery, sensor value + UI display value, hvac modes/setpoints, speed index/level, sprinkler zones, energy, lastChanged/lastSuccessfulComm, protocol. List tools keep the slim shape for prompt economy. - get_dependencies wraps getDependencies on all five entity namespaces — check before variable_delete / device_enable(false). - get_device_group wraps getGroupList and serialises the root device (batteryLevel lives only on the root of multi-endpoint modules). 66 -> 68 tools. Closes #33, closes #34, closes #35. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYAGXd4bE9D9Z5kZeSHeo7
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYAGXd4bE9D9Z5kZeSHeo7
…te filter, honest unknowns - _serialize_device_detail counts getter failures into attr_read_errors so a broken IOM can't read as 'device has no attributes'. - State dot-filter now drops a dotted key only when its base state exists (true sub-state signature: enum options, .ui strings) — a genuine dotted state id survives. - get_dependencies reports total_dependents: null for unrecognised shapes instead of a false 0 the description tells agents to trust. - get_device_group's vanished-root catch narrowed to the lookup; serializer bugs now surface loudly. - Coverage: all five getDependencies namespaces asserted against the mock (camelCase actionGroup pinned), wire-path dispatch for get_dependencies, detail shape through _get_device_handler, attr_read_errors, non-list/mixed getGroupList, unknown-shape fallback. 362 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYAGXd4bE9D9Z5kZeSHeo7
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.
Closes #33, closes #34, closes #35. Stacked on #32 — merge #32 first, retarget before deleting its branch.
get_device_by_id— fullstatesdict (enumerated-option duplicate keys dropped) + curated subclass attributes (battery, sensorValue, displayStateValUi, hvac/setpoints, speed, sprinkler zones, energy, timestamps, protocol). None-valued attributes omitted; list tools deliberately keep the slim shape.get_dependencies—getDependencieson device/variable/trigger/schedule/action_group with a total_dependents rollup; descriptions steer agents to check before destructive ops.get_device_group—getGroupList+ serialised root device with battery, resolving the null-battery-on-child-endpoint confusion on multi-endpoint Z-Wave modules.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYAGXd4bE9D9Z5kZeSHeo7