Skip to content

Commit

Permalink
Merge a1bd96b into c5c912f
Browse files Browse the repository at this point in the history
  • Loading branch information
ghys authored Dec 15, 2021
2 parents c5c912f + a1bd96b commit 087f584
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,14 @@ export default {
let newItemName = diacritic.clean(this.thing.label).replace(/[^0-9a-z]/gi, '')
newItemName += '_'
newItemName += (this.channel.label) ? diacritic.clean(this.channel.label).replace(/[^0-9a-z]/gi, '') : diacritic.clean(this.channelType.label).replace(/[^0-9a-z]/gi, '')
const defaultTags = (this.channel.defaultTags.length > 0) ? this.channel.defaultTags : this.channelType.tags
this.$set(this, 'newItem', {
name: newItemName,
label: this.channel.label || this.channelType.label,
category: (this.channelType) ? this.channelType.category : '',
groupNames: [],
type: this.channel.itemType || 'Switch',
tags: ['Point']
tags: (defaultTags.find((t) => SemanticClasses.Points.indexOf(t) >= 0)) ? defaultTags : [...defaultTags, 'Point']
})
},
loadProfileTypes (channel) {
Expand Down

0 comments on commit 087f584

Please sign in to comment.