Skip to content

Commit

Permalink
Merge 05aa94d into d6390d0
Browse files Browse the repository at this point in the history
  • Loading branch information
jsetton authored Jan 2, 2023
2 parents d6390d0 + 05aa94d commit 427f39d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const OPEN_STATES = ['CLOSED', 'OPEN']

export const PLAYBACK_OPERATIONS = ['Play', 'Pause', 'Next', 'Previous', 'FastForward', 'Rewind']

export const STATE_DESCRIPTION_OPTIONS_LIMIT = 150

export const TEMPERATURE_SCALES = ['CELSIUS', 'FAHRENHEIT']

export const THERMOSTAT_MODES = ['OFF', 'HEAT', 'COOL', 'ECO', 'AUTO']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
EQUALIZER_MODES,
LANGUAGES,
PLAYBACK_OPERATIONS,
STATE_DESCRIPTION_OPTIONS_LIMIT,
TEMPERATURE_SCALES,
THERMOSTAT_MODES,
UNITS_OF_MEASURE
Expand Down Expand Up @@ -232,7 +233,8 @@ export default {
stateDescription.options &&
stateDescription.options
.filter((option) => !isNaN(option.value))
.map((option) => `${option.value}=${option.label}`),
.map((option) => `${option.value}=${option.label}`)
.slice(0, STATE_DESCRIPTION_OPTIONS_LIMIT),
placeholder: placeholder.replace(/,/g, '\n'),
multiple: true
}),
Expand Down Expand Up @@ -356,7 +358,9 @@ export default {
default:
stateDescription &&
stateDescription.options &&
stateDescription.options.map((option) => `${option.value}=${option.label}`),
stateDescription.options
.map((option) => `${option.value}=${option.label}`)
.slice(0, STATE_DESCRIPTION_OPTIONS_LIMIT),
placeholder: placeholder.replace(/,/g, '\n'),
multiple: true,
required: !stateDescription || !stateDescription.options || !stateDescription.options.length
Expand All @@ -370,7 +374,9 @@ export default {
default:
stateDescription &&
stateDescription.options &&
stateDescription.options.map((option) => `${option.value}=${option.label}`),
stateDescription.options
.map((option) => `${option.value}=${option.label}`)
.slice(0, STATE_DESCRIPTION_OPTIONS_LIMIT),
placeholder: 'Normal=Normal:Cottons\nWhites=Whites',
multiple: true,
required: !stateDescription || !stateDescription.options || !stateDescription.options.length
Expand Down

0 comments on commit 427f39d

Please sign in to comment.