I dont know how to phrase this, and I am not feeling well today, so my brain is working at half speed.
Anyway, I have a SR04 Ultrasonic Distance Sensor feeding into Nodered (via Tasmota) for a Water Tank.
When the tank is full, the distance to sensor is 19cm, when the tank is empty, the distance to sensor is 150cm.
I need a way to convert the span of 19cm->150cm into 100% to 0% or similar, so that it is more humanly readable.
Is there an easy way to do this. I would probably figure it out if I was firing on all 4 cylinders today.