Reworked numericMenuItem to be able to display a different conten in the sublabel than jus a number.

This commit is contained in:
thmichel
2025-10-25 21:26:44 +02:00
parent 264b160fdf
commit 2cd171637c
4 changed files with 78 additions and 13 deletions

View File

@@ -32,11 +32,11 @@ class HomeAssistantNumericFactory extends WatchUi.PickerFactory {
// Get values from data
var val = data.get("start");
var val = data.get("min");
if (val != null) {
mStart = val.toString().toFloat();
}
val = data.get("stop");
val = data.get("max");
if (val != null) {
mStop = val.toString().toFloat();
}
@@ -44,7 +44,7 @@ class HomeAssistantNumericFactory extends WatchUi.PickerFactory {
if (val != null) {
mStep = val.toString().toFloat();
}
val = data.get("formatString");
val = data.get("display_format");
if (val != null) {
mFormatString = val.toString();
}