Update alexa step speaker integration (#1270)

Signed-off-by: jsetton <jeremy.setton@gmail.com>
pull/1284/head
Jeremy 2022-01-16 09:48:25 -05:00 committed by GitHub
parent bdb7a7f1c3
commit b6ebb6c328
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 9 deletions

View File

@ -112,11 +112,19 @@ export default {
},
VolumeLevel: {
itemTypes: ['Dimmer', 'Number'],
parameters: (item) => [p.increment(10), ...(item.type === 'Number' ? [p.stepSpeaker()] : [])]
parameters: () => [p.increment(10), p.retrievable()]
},
VolumeStep: {
itemTypes: ['String'],
parameters: () => [p.valueMapping('VOLUME_UP', true), p.valueMapping('VOLUME_DOWN', true)]
},
MuteState: {
itemTypes: ['Switch'],
parameters: () => [p.inverted(), p.stepSpeaker()]
parameters: () => [p.inverted(), p.retrievable()]
},
MuteStep: {
itemTypes: ['String'],
parameters: () => [p.valueMapping('MUTE', true)]
},
EqualizerBass: {
itemTypes: ['Dimmer', 'Number'],

View File

@ -16,7 +16,9 @@ const switchAttributes = ['PowerLevel', 'Percentage', ...genericDeviceAttributes
const entertainmentAttributes = [
'VolumeLevel',
'VolumeStep',
'MuteState',
'MuteStep',
'Channel',
'ChannelStep',
'Input',

View File

@ -313,13 +313,6 @@ export default {
multiple: true,
visible: (_, config) => !!config.retrievable
}),
stepSpeaker: () => ({
name: 'stepSpeaker',
label: 'Control Speaker in Discrete Steps',
type: 'BOOLEAN',
default: false,
advanced: true
}),
supportedArmStates: () => ({
name: 'supportedArmStates',
label: 'Supported Arm States',