[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
Mark Herwege 2023-06-14 11:42:23 +02:00 committed by GitHub
parent f32b8a4363
commit e75f001c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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();
};