[powerdebug 04/22] Rewrite the sensor code with the tree