Sensor value scaling

Hi,
I have sensor that gives values from 0.0 to 3.0 I would like to scale it to 0-255 and reverse.
So if the original value is 0.0 that gives 255 on the output.
Any tips?

TIA

1 Like

Thanks Tom,

It’s first time I see compensation in HA. Not sure how I missed it.

It’s relatively new.

1 Like