fruggy83 / openocean

27 stars 11 forks source link

Add ability to validate new values in channel "totalusage" #66

Closed dominikkv closed 4 years ago

dominikkv commented 5 years ago

When combining two EEPs in one thing, and the two EEPs has different precisions, there will be cases where the value will decrease, which should not be possible for this channel. Adding a validation where decreases smaller than 1kWh are prevented will fix this. While adding this, we can also add a validation which prevents value increases greater than 10 kWh to prevent pikes from false readings. The validation should be configurable through channel config, with the default of no validation.

fruggy83 commented 4 years ago

Implemented and already merged in upstream.