Skip to content

[DSL generator] Do not generate thing label if same as in thing type#5305

Merged
holgerfriedrich merged 1 commit into
openhab:mainfrom
lolodomo:dsl_gen_hide_thing_label
Feb 14, 2026
Merged

[DSL generator] Do not generate thing label if same as in thing type#5305
holgerfriedrich merged 1 commit into
openhab:mainfrom
lolodomo:dsl_gen_hide_thing_label

Conversation

@lolodomo

Copy link
Copy Markdown
Contributor

Apply the same logic as for YAML.

Apply the same logic as for YAML.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo requested a review from a team as a code owner January 25, 2026 10:07
@jimtng

jimtng commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

I'm not sure I agree with this. It's mixing up the properties of the two entities and it can make things confusing.

@lolodomo

Copy link
Copy Markdown
Contributor Author

If you load a thing without label, you expect the same when re-exporting it.

@jimtng

jimtng commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

Bear with me a bit because I don't understand this. If the thing was without label, why would thing.getLabel() return anything but null?

@lolodomo

lolodomo commented Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

Because the default is to take the label in the thing type if not defined in the thing itself. This is like that probably since OH 2 (introduction of thing concept).

@jimtng

jimtng commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

Thanks for the explanation

@holgerfriedrich holgerfriedrich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holgerfriedrich holgerfriedrich merged commit 5391ba2 into openhab:main Feb 14, 2026
5 checks passed
@holgerfriedrich holgerfriedrich added the enhancement An enhancement or new feature of the Core label Feb 14, 2026
@holgerfriedrich holgerfriedrich added this to the 5.2 milestone Feb 14, 2026
@lolodomo lolodomo deleted the dsl_gen_hide_thing_label branch February 14, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature of the Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants