mirror of
https://github.com/beestat/app.git
synced 2025-05-31 12:16:39 -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
|
// Create or update the database
|
||||||
foreach ($datas as $data) {
|
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) {
|
if(isset($existing_timestamps[$data['sensor_id']][$data['timestamp']]) === true) {
|
||||||
$data['runtime_sensor_id'] = $existing_timestamps[$data['sensor_id']][$data['timestamp']];
|
$data['runtime_sensor_id'] = $existing_timestamps[$data['sensor_id']][$data['timestamp']];
|
||||||
$this->database->update('runtime_sensor', $data, 'id');
|
$this->database->update('runtime_sensor', $data, 'id');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user