I’m on OH 4.3.0.
It seems to me as if Blockly returns a String where a Number is expected - but maybe I’m wrong.
The following items are used:
DateTime MAWeatherID_Zuletztgesehen { channel="exec:command:mobilealertsAPI:output"[profile="transform:JSONPATH", function="$.devices[0].measurement.c", sourceFormat="%s"], stateDescription=""[pattern="%1$td.%1$tm.%1$tY, %1$tH:%1$tM:%1$tS"] }
Number MAWeatherIDTimestamp_Zuletztgesehen_Age { unit="min", stateDescription=""[pattern="%.0f min"]}
Why don’t the following blocks provide a Number?
Log:
2025-01-02 15:26:01.370 [INFO ] [script.ui.test_blockly_logic_numbers] - Rule fired ...
2025-01-02 15:26:01.378 [INFO ] [script.ui.test_blockly_logic_numbers] - 1
2025-01-02 15:26:01.390 [INFO ] [script.ui.test_blockly_logic_numbers] - 1.0
2025-01-02 15:26:01.390 [INFO ] [script.ui.test_blockly_logic_numbers] - false
2025-01-02 15:26:01.391 [INFO ] [script.ui.test_blockly_logic_numbers] - 1
2025-01-02 15:26:01.391 [INFO ] [script.ui.test_blockly_logic_numbers] - false
2025-01-02 15:26:01.397 [INFO ] [script.ui.test_blockly_logic_numbers] - false
The following screenshot shows that the decimal point is white - I think it should be in the same color as the numbers to be recognized as a number… I think, in this case there shouldn’t be any decimal point at all.
Is this a bug or am I doing something wrong?