mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
Fixed #247 - Primary thermostat missing on Sensor Detail
This commit is contained in:
parent
5f2efbc7ba
commit
adfd70c13a
@ -744,7 +744,7 @@ class runtime extends cora\api {
|
||||
|
||||
// Create or update the database
|
||||
foreach ($datas as $data) {
|
||||
if(isset($data['temperature']) === true && isset($data['occupancy']) === true) {
|
||||
if(isset($data['temperature']) === true || isset($data['occupancy']) === true) {
|
||||
if(isset($existing_timestamps[$data['sensor_id']][$data['timestamp']]) === true) {
|
||||
$data['runtime_sensor_id'] = $existing_timestamps[$data['sensor_id']][$data['timestamp']];
|
||||
$this->database->update('runtime_sensor', $data, 'id');
|
||||
|
Loading…
x
Reference in New Issue
Block a user