diff --git a/frontend/dash-home/src/components/controller/template/Range.tsx b/frontend/dash-home/src/components/controller/template/Range.tsx index b287c43..cf08299 100644 --- a/frontend/dash-home/src/components/controller/template/Range.tsx +++ b/frontend/dash-home/src/components/controller/template/Range.tsx @@ -57,7 +57,10 @@ class Range extends React.Component {

{this.props.title && this.props.title} - {this.state.value.toFixed(1)} + {this.state.value.toFixed((() => { + const e = String(this.props.step).split('.') + return e.length !== 1 ? e[e.length - 1].length : 0 + })())} {this.props.suffix && {this.props.suffix}}