Skip to content

Raise ValueError for the invalid producer input 0.25.0 warned about - #120

Merged
dcj merged 2 commits into
mainfrom
gh-91-raise-invalid-input
Nov 11, 2026
Merged

dcj merged 2 commits into
mainfrom
gh-91-raise-invalid-input

Conversation

@dcj

@dcj dcj commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Part of #91: the raise step promised by 0.25.0 for its warnings.

Breaking. The ten reasons (propertyRetainedNull, propertyDatatypeMissing, propertyDatatypeUnknown, propertyFormatMissing, propertyEnumFormatEmptyValue, propertyEnumFormatDuplicate, propertyColorFormatInvalid, deviceDescriptionExtrasCoreFieldDropped, devicePublishAlertIdFormat, devicePublishAlertEmptyMessage) raise ValueError before anything is published or attached, with the same reason= fields. PropertySpec checks at declaration time so a builder never stops half-way. _warn_invalid_once stays for the warn-only checks in #92. #114 tracks the remaining inconsistency in publish_alert() id handling.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VUQ6apRySRNW8y3ppJMdJC

dcj and others added 2 commits November 11, 2026 15:27
)

The ten reasons warned about since 0.25.0 now raise before anything is
published or attached: from the Property constructor (so from_dict,
add_property_from_dict and the declaration builders), set_format,
Device(description_extras=...) and publish_alert. _warn_invalid_once
stays for the warn-only checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VUQ6apRySRNW8y3ppJMdJC
…nput

# Conflicts:
#	CHANGELOG.md
#	tests/test_homie_compliance.py
@dcj
dcj merged commit 5630f02 into main Nov 11, 2026
5 checks passed
@dcj
dcj deleted the gh-91-raise-invalid-input branch November 11, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant