Add test for handle_sensor_value, fix version test race condition