* Add tests with UoM conversion
For `PersistenceThresholdFilter` add a test case that fails when
using temperatures in °C and a threshold in Kelvin. The threshold
should ignore the offset (0 °C = 273,15 K).
Add another test with length to increase coverage.
Signed-off-by: Christoph Gehrke <cgdev@duck.com>
* Fix PersistenceThresholdFilter UoM conversion
Use `toUnitRelative()` instead of `toUnit()` for delta (the difference
of old and current state). In particular for temperatures an offset
of different units (like °C and K) should be ignored when considering
the delta.
Signed-off-by: Christoph Gehrke <cgdev@duck.com>
---------
Signed-off-by: Christoph Gehrke <cgdev@duck.com>