We have several implementations where we use 0-10v Analog distance sensors for different solutions. Some require a rendered result as a Percentage, others as a numeric Value still others as a Distance. ALL will receive sensor data as a voltage between 1 - 10 volts. 10 being highest(or farthest).
GOAL: Transform this changing value to an appropriate unit of measure, then present within HA
The above charts tells us when an object is 100mm away the sensor will send Data at 1volt…when the object is 600mm away, 6volt and so on…
- We can use HA built in charts however, we’d like to use ApexCharts as well
- How can we translate 1volt sensor data = 0 gallons
10volt reading would be 700 gallons - How would we translate 1volt sensor data = Empty
2volt = 20%, 3volt = 30%, 4volt = 40%, 5volt = 50%
It would also be nice to create buffer, to allow for the accuracy of the sensor…
We already have the sensor on place and data (state) coming in…
Do we approach this in YAML or set variables within an array (MACRO ??)
I’m a Network engineer with Unix, Bash, Perl, HTML experience… please be kind.
any direction would be appreciated…