Skip to content

Commit

Permalink
Merge 8ccffd1 into 8fbf039
Browse files Browse the repository at this point in the history
  • Loading branch information
jsetton authored Jan 18, 2022
2 parents 8fbf039 + 8ccffd1 commit 651b3c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export default {
Channel: {
itemTypes: ['Number', 'String'],
parameters: (item) => [
p.channelMappings(item.stateDescription, item.type === 'String'),
...(item.type === 'Number' ? [p.channelRange()] : []),
p.channelMappings(item.type === 'String'),
...(item.type === 'Number' ? [p.channelRange()] : [p.supportsChannelNumber()]),
p.retrievable()
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,11 @@ export default {
multiple: true,
required: !defaultValue
}),
channelMappings: (stateDescription, required) => ({
channelMappings: (required) => ({
name: 'channelMappings',
label: 'Channel Mappings',
description: 'Each mapping formatted as <code>channelId=channelName<code>',
type: 'TEXT',
default:
stateDescription &&
stateDescription.options &&
stateDescription.options
.filter((option) => !isNaN(option.value))
.map((option) => `${option.value}=${option.label}`),
placeholder: '2=CBS\n4=NBC\n7=ABC\n13=PBS',
multiple: true,
required
Expand Down Expand Up @@ -405,6 +399,13 @@ export default {
advanced: true,
visible: (_, config) => !config.binding
}),
supportsChannelNumber: () => ({
name: 'supportsChannelNumber',
label: 'Supports Channel Requests by Number',
type: 'BOOLEAN',
default: false,
advanced: true
}),
supportsDeactivation: () => ({
name: 'supportsDeactivation',
label: 'Supports Deactivation',
Expand Down

0 comments on commit 651b3c5

Please sign in to comment.