Repository navigation
Allow multi-value and unset custom properties in device and event type hints - #215
Merged
Mo-Elshenawy1 merged 2 commits intoNov 6, 2026
Merged
Conversation
The `properties` type hints on `create_device`, `update_device`, `create_event`, and `update_event` now accept a list of strings for custom properties that take multiple enum values, and the update methods also accept `None` to unset a property. Docstrings describe both. Request bodies are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yf4xszPJuZbmsVHpZeUGr
mguida22
approved these changes
Nov 6, 2026
Mo-Elshenawy1
deleted the
claude/exciting-cori-o7rsiy-fu-property-types
branch
November 6, 2026 21:24
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.
Changelog
Device and event
propertiestype hints accept lists of strings for multi-value properties, andNoneon updates to unset a property.Docs
None
Description
The v1 API accepts a list of strings for a multi-value enum custom property, and on updates a
nullvalue unsets a property. Thepropertiestype hints oncreate_event,update_event,create_deviceandupdate_deviceallowed only scalars, so type checkers rejected valid calls. They now acceptList[str], andNoneon the update methods.Only hints and docstrings change; the requests sent are the same. The
update_eventdocstring also said "device" where it meant "event", which is corrected. Session methods are left to the open sessions PR, to avoid a conflict.Validated with black, flake8, pyright (including a scratch check of calls passing lists and
None), and pytest on Python 3.8: 204 passed. The ROS message tests can't install their dependencies in my environment, so CI covers those.client.update_device(device_id="dev_1", properties={"tags": ["a", "b"], "old": None})was flagged by type checkers.It type-checks and sends the same request.
Generated by Claude Code