Use code fences to post what you’ve done. The forum mangles code so it’s impossible to see what the filter actually is.
```
code goes here
```
Posting the full file is probably going to be needed because the error is a syntax error and the error may be elsewhere an not be a part of this small part of the config file.
The log points exactly to the line where “}” is. When I remove “K” it is OK but then oh doesn’t recognise item input which is Number:Temperature type. When I removed everything leaving just this portion of code, the error statement was just the same so I believe that the remaining part of the code is ok.
When I copied the example from the oh documentation webpage, the behaviour was exactly the same, so I believe that there is no error in my changes. Is it my implementation of oh (Ubuntu) or is it a bug?
Had the same in oh 4.3.2, it did not accept negative values as well. When I moved to oh 4.3.3 the negative values in the filter are accepted but still no units of measure. The same happens when I use °C or C as unit of measure.
At first I thought that, as mentioned above, the documentation might be wrong because it not only says that UoM in presistance filter are accepted (and uses them in examples) but stresses that they should be used:
In case of dimensional items (e.g Number:Temperature) a unit MUST be provided.
I used the example code in my oh implementation and the log error were just the same as when I used my code.
When I use filter, which has no UoM stated, it compares the values of an item with UoM and says that they are uncomparable:
2025-02-28 09:06:48.916 [WARN ] [ence.filter.PersistenceIncludeFilter] - Cannot compare 5.03125 °C to range -100 - 200
So there definitly is an unconsisancy in it.
At least in my case accepting UoM would be of a great help. Thank you for your support all.
My code is more thatn 500 lines long and it works without UoM, so I guess there is no point in pasting it here. I checked with the example code instead and it showes the same error codes.