mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Don't store sensor data if temperature/occupancy are null
This commit is contained in:
parent
846eb9bb93
commit
882dec840e
@ -634,7 +634,7 @@ class runtime extends cora\api {
|
||||
in_array($capability['type'], ['temperature', 'occupancy']) === true
|
||||
) {
|
||||
if ($value === null) {
|
||||
$datas[$sensor['sensor_id']][$capability['type']] = null;
|
||||
continue 3; // If temperature or occupancy are null, ignore
|
||||
} else {
|
||||
$datas[$sensor['sensor_id']][$capability['type']] = ($capability['type'] === 'temperature') ? ($value * 10) : $value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user