I have a couple of shelly switches which report current Watts. Values are coming in with 2 digits accurancy:
2022-10-26 10:32:00.352 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Licht_Grillterrasse_Tisch_W' changed from 0 W to 0.03 W
2022-10-26 10:32:03.732 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Licht_Grillterrasse_Tisch_W' changed from 0.03 W to 0 W
is there any chance to limit the decimal places to 1 or 0 on the channel definition?
intention is to prevent rules from triggering on minor change of a value.
But do look into profiles, which operate on the channel-Item link - and so allow manipulation of data between channel and Item.
Why, it doesn’t cost anything?
Bear in mind that adding code or config elsewhere to do the rounding is only moving the work on every change.
In addition to @rossko57 :
The more common way would to define different trigger-values for ON-to-OFF and the OFF-to-ON case (iaw define the hysteris). A bigger the difference will result in a less frequent trigger events.