[BasicUI] Adjust slider unit handling (#1922)
Adjust BasicUI slider unit handling. So far, the unit was not passed on to the slider. With proposed changes in core https://github.com/openhab/openhab-core/pull/3644, unit would be passed and needs to stripped for the slider to work properly. Signed-off-by: Mark Herwege <mark.herwege@telenet.be>pull/1916/head^2
parent
f32b8a4363
commit
e75f001c35
|
@ -1680,7 +1680,6 @@
|
|||
}, 200);
|
||||
|
||||
_t.setValuePrivate = function(value, itemState) {
|
||||
// itemState contains only value in the display unit (in case unit is set in label pattern)
|
||||
if (_t.hasValue) {
|
||||
_t.valueNode.innerHTML = value;
|
||||
}
|
||||
|
@ -1695,7 +1694,7 @@
|
|||
if (itemState === "NULL" || itemState === "UNDEF") {
|
||||
_t.input.value = 0;
|
||||
} else {
|
||||
_t.input.value = itemState;
|
||||
_t.input.value = itemState.split(" ")[0] * 1;
|
||||
}
|
||||
_t.input.MaterialSlider.change();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue