Create equipment from model: Use semanticEquipmentTag of Thing (#3124)

Refs https://github.com/openhab/openhab-core/pull/4617.

If the thing provides a default `semanticEquipmentTag`, this will be
used when creating an equipment from thing instead of the default
`Equipment`.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
pull/3152/head
Mark Herwege 2025-04-15 17:43:42 +02:00 committed by GitHub
parent 56ee4d15e0
commit 9e3b377796
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -287,10 +287,11 @@ export default {
this.selectedThingChannelTypes = data2[1]
if (this.createEquipment) {
const semanticEquipmentTag = this.selectedThing.semanticEquipmentTag || 'Equipment'
this.newEquipmentItem = {
name: this.$oh.utils.normalizeLabel(this.selectedThing.label),
label: this.selectedThing.label,
tags: ['Equipment'],
tags: [semanticEquipmentTag],
type: 'Group',
groupNames: (this.parent) ? [this.parent.item.name] : []
}