Some charging points send -1 there if the value is unknown. Definitely
unexpected, but I actually can't find anything in the spec that
excplicitly says that the value has to be positive (although it's
reasonable to expect it from a meter reading). In any case, the spec
explicitly says that the CS shouldn't reject a StopTransaction even if
sanity checks fail, and this validation prevents the ocpp-go user from
deciding for themselves.
Some charging points send -1 there if the value is unknown. Definitely unexpected, but I actually can't find anything in the spec that excplicitly says that the value has to be positive (although it's reasonable to expect it from a meter reading). In any case, the spec explicitly says that the CS shouldn't reject a StopTransaction even if sanity checks fail, and this validation prevents the ocpp-go user from deciding for themselves.