1
0
mirror of https://github.com/beestat/app.git synced 2026-05-13 10:52:29 -04:00

Changed TVOC Summary to Air Quality Summary

This better reflects the little color scale in the ecobee app.
This commit is contained in:
Jon Ziebell
2022-07-06 19:15:06 -04:00
parent 48972a8e75
commit abab24cd24
7 changed files with 81 additions and 77 deletions
+5
View File
@@ -112,6 +112,11 @@ class runtime_sensor extends cora\crud {
if ($runtime_sensor['temperature'] !== null) {
$runtime_sensor['temperature'] /= 10;
}
// Normalize air quality from 0-350 to 0-100;
if ($runtime_sensor['air_quality'] !== null) {
$runtime_sensor['air_quality'] = round($runtime_sensor['air_quality'] / 350 * 100);
}
}
return $runtime_sensors;