Skip to content

Commit

Permalink
fix(editor): Decimals/step_size should be numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
nervetattoo committed Apr 8, 2021
1 parent 95b8438 commit 082726c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function setValue(obj, path, value) {
o[a[0]] = value
}

const OptionsDecimals = ['0', '1']
const OptionsDecimals = [0, 1]

const OptionsStepSize = ['0.5', '1']
const OptionsStepSize = [0.5, 1]

const OptionsStepLayout = ['column', 'row']

Expand Down Expand Up @@ -178,7 +178,7 @@ export default class SimpleThermostatEditor extends LitElement {
<paper-listbox
slot="dropdown-content"
.selected=${Object.values(OptionsDecimals).indexOf(
String(this.config.decimals)
+this.config.decimals
)}
>
${Object.values(OptionsDecimals).map(
Expand Down Expand Up @@ -223,7 +223,7 @@ export default class SimpleThermostatEditor extends LitElement {
<paper-listbox
slot="dropdown-content"
.selected=${Object.values(OptionsStepSize).indexOf(
String(this.config.step_size)
+this.config.step_size
)}
>
${Object.values(OptionsStepSize).map(
Expand Down

0 comments on commit 082726c

Please sign in to comment.