Question: Is it possible to have virtual sensors display whole numbers (rounded or truncated) instead of decimal to .00 ?
I source some data via script and not from my weather station hardware, I have whole numbers, but MeteoHub virtual sensors appear to format data to the same format as the trigger sensor; I read that in the documentation. I didn't see a data format that wasn't calculated as 1/100, but I probably missed something. I would like to have the data displayed without modification.
My site: y-naut.net
My dashboard: https://y-naut.net/pwsWD/index.php
My simple dashboard: https://y-naut.net/pwsWD/simple.php (the issue is easiest to see here; bottom center "Lake water elev %"))
My clientraw file: https://y-naut.net/wdlive/clientraw.txt
My extra sensors file: https://y-naut.net/wdlive/extra_sensors.txt
The extra sensors data I would like to display as whole numbers: h2opnct, inflow, outflow
Virtual sensor input fields (website):
New ID: data11
Name: percent full
Trigger: data7 (Raspberry Pi heartbeat; I also tried sol1 since solar appears to be whole numbers)
Conversion: awk '{printf(''%.0f'',$1*100)}' /var/local/h2opnct
I also tried:
Conversion: awk '{print $1*100}' /var/local/h2opnct
data contained in /var/local/h2opnct: 85 (no newline, no additional characters; data changes, but is always whole numbers)
Thank you for looking, I'm at a point where I'm just confusing myself looking at code.
Is it possible to configure virtual sensors display to whole numbers?
Moderator: Mattk
