feat: omit current sensors with more than 100A (#943)

This commit is contained in:
Serhiy Mytrovtsiy
2022-05-22 19:03:36 +02:00
parent 1f761a4028
commit 39e6d41b14

View File

@@ -76,6 +76,8 @@ internal class SensorsReader: Reader<[Sensor_p]> {
self.list += list.filter({ (s: Sensor) -> Bool in
if s.type == .temperature && (s.value == 0 || s.value > 110) {
return false
} else if s.type == .current && s.value > 100 {
return false
}
return true
})