Skip to content

Commit

Permalink
feat(ui): add value format to Custom ConfigCC (#2837)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Dec 9, 2022
1 parent ad42de0 commit 11dc84d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/components/nodes-table/NodeDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,13 @@
v-model.number="configCC.value"
/>
</v-col>
<v-col cols="3">
<v-select
label="Format"
:items="configCCValueFormats"
v-model="configCC.valueFormat"
/>
</v-col>
<v-col cols="3">
<v-btn
width="60px"
Expand Down Expand Up @@ -306,6 +313,8 @@
value: configCC.value,
valueSize:
configCC.valueSize,
valueFormat:
configCC.valueFormat,
},
],
])
Expand Down Expand Up @@ -334,6 +343,7 @@ import ValueID from '@/components/ValueId'
import { inboundEvents as socketActions } from '@/../server/lib/SocketEvents'
import { mapState, mapActions } from 'pinia'
import { validTopic } from '@/lib/utils'
import { ConfigValueFormat } from '@zwave-js/core/safe'
import { RFRegion } from 'zwave-js/safe'
import useBaseStore from '../../stores/base.js'
Expand All @@ -353,10 +363,17 @@ export default {
options: {},
newName: this.node.name,
newLoc: this.node.loc,
configCCValueFormats: Object.keys(ConfigValueFormat)
.filter((k) => isNaN(k))
.map((key) => ({
text: key,
value: ConfigValueFormat[key],
})),
configCC: {
value: 0,
valueSize: 1,
parameter: 1,
valueFormat: ConfigValueFormat.UnsignedInteger,
},
rfRegions: Object.keys(RFRegion)
.filter((k) => isNaN(k))
Expand Down

0 comments on commit 11dc84d

Please sign in to comment.