geerlingguy / airgradient-prometheus

AirGradient Prometheus exporter.
MIT License
174 stars 59 forks source link

Code for Fahrenheit? #27

Closed michaelmastrianni closed 2 years ago

michaelmastrianni commented 2 years ago

Hello,

Your fork is fabulous! I was playing with the code and can change the format "C" to "F" but cannot change the temp output. How would I do that?

Thank you!

Michael

ekainz commented 2 years ago

Replace line 214: showTextRectangle("TMP", String(stat.t, 1) + "C", false); with showTextRectangle("TMP", String(stat.t*9/5+32, 1) + "F", false);

geerlingguy commented 2 years ago

Please see: https://github.com/geerlingguy/airgradient-prometheus/pull/28 — it's now easier to configure F or C.