Update alexa channel attribute (#1284)
Signed-off-by: jsetton <jeremy.setton@gmail.com>pull/1313/head
parent
5b30761d60
commit
1bdbdf9d21
|
@ -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()
|
||||
]
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue