battery level %

Nikolai Anastasov 20 hours ago
(battery <= 3.590) ? 0 : ((battery >= 4.220) ? 100 : (battery - 3.590) * 100 / (4.220 - 3.590)) 

Can I round it to two decimal places?
battery.pic.png

It also appears as an error in the logs, but it actually works correctly.

Attribute computation error - org.traccar.handler.ComputedAttributesHandler.computeAttribute:146@1:2 variable 'battery' is undefined - Variable (ComputedAttributesHandler:147 < *:159 < BasePositionHandler:34 < ProcessingHandler:169 < *:178 < MotionHandler:41 < ...)
Anton Tananaev 19 hours ago
  1. You need to round in your expression
  2. The error indicates that not all positions include battery attribute, so you should handle that.