[BF] Some sensors make wrong measurements near 0 not exactly 0, so ABS(value) >= 0.1 is alse false

This commit is contained in:
BlubbFish 2018-05-10 06:26:39 +00:00
parent 64d74668cc
commit a22628b0d0
3 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
Double l = Double.Parse(json["val"]["value"].ToString());
if (t == "Power" && (l > 3660 || l < 0) ||
t == "Temperature" && (l > 65 || l < -25) ||
(t == "Temperature" && this.Level >= 4 && l == 0)) {
(t == "Temperature" && this.Level >= 4 && Math.Abs(l) >= 0.1)) {
return;
}
}

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.1.0")]
[assembly: AssemblyFileVersion("1.4.1.0")]
[assembly: AssemblyVersion("1.4.2.0")]
[assembly: AssemblyFileVersion("1.4.2.0")]

Binary file not shown.