Fix the storm-annotation text box: max:500 exceeded HA's MQTT ceiling - #1
Merged
Merged
Conversation
homeassistant.components.text clamps native_max_value to (0, 255) for every platform, including MQTT. The 0.12.1 discovery config for creek_annotate_latest_storm set max: 500, which isn't clamped down to fit — MQTT discovery validates the payload against the platform schema before creating the entity, so the whole discovery message for that one entity was rejected and silently dropped. Nothing in the add-on's own logs pointed at it; it was only visibly missing from HA's MQTT device page, which is what the user reported. Fix: max: 255. Added test_annotate_text_entity_max_is_within_the_mqtt_text_platform_ceiling, which checks every discovery entity with a `max` field against that ceiling and is confirmed to fail against the 0.12.1 config. Bumped to 0.12.2 with a CHANGELOG entry explaining the root cause. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GChdJWPfuCn9gD8giKbLLi
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.
homeassistant.components.text clamps native_max_value to (0, 255) for every platform, including MQTT. The 0.12.1 discovery config for creek_annotate_latest_storm set max: 500, which isn't clamped down to fit — MQTT discovery validates the payload against the platform schema before creating the entity, so the whole discovery message for that one entity was rejected and silently dropped. Nothing in the add-on's own logs pointed at it; it was only visibly missing from HA's MQTT device page, which is what the user reported.
Fix: max: 255. Added
test_annotate_text_entity_max_is_within_the_mqtt_text_platform_ceiling, which checks every discovery entity with a
maxfield against that ceiling and is confirmed to fail against the 0.12.1 config. Bumped to 0.12.2 with a CHANGELOG entry explaining the root cause.Claude-Session: https://claude.ai/code/session_01GChdJWPfuCn9gD8giKbLLi