Skip to content

fix: make componentType optional in EvvaComponent - #195

Merged
andreasgrill merged 1 commit into
mainfrom
fix/evva-component-optional-component-type
Sep 13, 2026
Merged

andreasgrill merged 1 commit into
mainfrom
fix/evva-component-optional-component-type

Conversation

@andreasgrill

Copy link
Copy Markdown
Collaborator

Summary

  • EvvaComponent.componentType is now optional (ComponentType? = null), since the MQTT API can return components without it (e.g. {"id": "...", "upgradeMedia": true}).
  • Unknown component type values are now coerced to null, like other optional enums.
  • Tests: added a decoding test for a component without componentType; tests that used an unknown componentType as an unparsable payload now use a missing id instead.

Note: the property type changes to nullable, so consumers accessing componentType directly need to handle null.

Closes: #194

🤖 Generated with Claude Code

The MQTT API can return EVVA components without a componentType, which
caused query responses to fail parsing. Unknown component types are now
coerced to null like other optional enums.

Closes: #194

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@andreasgrill
andreasgrill merged commit da73e98 into main Sep 13, 2026
2 checks passed
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.

fix: make componentType optional in EvvaComponent

1 participant