Skip to content

[mqtt] Improve configuration validation - #21451

Draft
lsiepel wants to merge 1 commit into
openhab:mainfrom
lsiepel:mqtt-validate-channel-topics
Draft

[mqtt] Improve configuration validation#21451
lsiepel wants to merge 1 commit into
openhab:mainfrom
lsiepel:mqtt-validate-channel-topics

Conversation

@lsiepel

@lsiepel lsiepel commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This bug fix validates MQTT channel topic configuration during Thing initialization.

This change:

  • Requires state channels to define at least one of stateTopic or commandTopic.
  • Requires dedicated trigger channels and channels configured with trigger=true to define stateTopic.
  • Sets the Thing to OFFLINE with CONFIGURATION_ERROR and identifies invalid channels.

Depends on #21449 for the related typed-trigger channel handling.

Fixes: #20100

Disclaimer: tests and documentation created here with assistence from codex, supervised and reviewed by me, runtime code by me

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
@lsiepel lsiepel added bug An unexpected problem or unintended behavior of an add-on awaiting other PR Depends on another PR labels Aug 21, 2026
@lsiepel lsiepel changed the title [mqtt] Fix configuration validation [mqtt] Improve configuration validation Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting other PR Depends on another PR bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MQTT] Thing loaded normally when using custom definition instead of defined definition

1 participant