Filtering out rubish modbus readouts

I don’t use modbus so not yes specifically. But it’s not unusual for sensors to periodically throw a bogus reading every now and then.

Use one of Basic Profiles - Transformation Services | openHAB or a script transform profile (e.g. Filter Profile) to filter out those erroneous measurements based on what ever criteria you think makes the most sense.,

There won’t be any DB issues because the state is filtered out before it ever gets to the Item.