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
parent
56ee4d15e0
commit
9e3b377796
|
@ -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] : []
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue