Widget duplication Fix
This commit is contained in:
parent
05bd0dbc64
commit
14a33b83d0
@ -75,6 +75,7 @@ class SubDeviceManager
|
|||||||
public static function getSubdevicesByRoomIds($roomIds = NULL) {
|
public static function getSubdevicesByRoomIds($roomIds = NULL) {
|
||||||
if(empty($roomIds)) return NULL;
|
if(empty($roomIds)) return NULL;
|
||||||
|
|
||||||
|
//TODO: @Patrik Check line 89
|
||||||
$rows = Db::loadAll("
|
$rows = Db::loadAll("
|
||||||
SELECT d.room_id, sd.subdevice_id, sd.device_id, d.name, sd.type, sd.unit, r.value FROM subdevices sd
|
SELECT d.room_id, sd.subdevice_id, sd.device_id, d.name, sd.type, sd.unit, r.value FROM subdevices sd
|
||||||
JOIN devices d ON sd.device_id = d.device_id
|
JOIN devices d ON sd.device_id = d.device_id
|
||||||
@ -85,6 +86,7 @@ class SubDeviceManager
|
|||||||
FROM records
|
FROM records
|
||||||
GROUP BY subdevice_id
|
GROUP BY subdevice_id
|
||||||
)
|
)
|
||||||
|
GROUP BY subdevice_id
|
||||||
ORDER BY type DESC
|
ORDER BY type DESC
|
||||||
", $roomIds);
|
", $roomIds);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user