Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
* UI tweaks
* Fix for incorrect processing for devices with friendly names set in Zigbee2Mqtt
  • Loading branch information
sergejey committed Aug 13, 2021
1 parent 6efa169 commit 51c5a45
Show file tree
Hide file tree
Showing 9 changed files with 2,477 additions and 2,593 deletions.
6 changes: 6 additions & 0 deletions modules/zigbee2mqtt/mqtt_edit.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
debmes($sql,'zigbee2mqtt');
$rec=SQLSelectOne($sql);

if ($rec['DEV_ID']) {
$device=SQLSelectOne("SELECT ID, TITLE FROM zigbee2mqtt_devices WHERE ID=".$rec['DEV_ID']);
$out['DEVICE_TITLE']=$device['TITLE'];
$out['DEVICE_ID']=$device['ID'];
}



if ($this->mode=='creategroup') {
Expand Down
2 changes: 1 addition & 1 deletion modules/zigbee2mqtt/mqtt_search.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
//if (($req_type==' ')&&($req_vendor==' ')) $req_vid=' and SELECTVENDOR <>"group" ';

// $res=SQLSelect('select zigbee2mqtt_devices.ID DEVID, zigbee2mqtt_devices.*,LOCATION from zigbee2mqtt_devices left join (select ID LOCID, TITLE LOCATION from locations) locations ON zigbee2mqtt_devices.LOCATION_ID=locations.LOCID where TITLE<>"bridge" '.$req_location.' '. $req_type. ' order by FIND DESC' );
$sql='select zigbee2mqtt_devices.ID DEVID, zigbee2mqtt_devices.TYPE , zigbee2mqtt_devices.*,LOCATION from zigbee2mqtt_devices left join (select ID LOCID, TITLE LOCATION from locations) locations ON zigbee2mqtt_devices.LOCATION_ID=locations.LOCID where TITLE<>"bridge" and selecttype<>"cc2531" '.$req_location.' '. $req_type.' '.$req_vendor. ' '.$req_vid. ' '.$req_group. ' order by DATE(FIND) DESC, SELECTVENDOR ';
$sql='select zigbee2mqtt_devices.ID DEVID, zigbee2mqtt_devices.TYPE , zigbee2mqtt_devices.*,LOCATION from zigbee2mqtt_devices left join (select ID LOCID, TITLE LOCATION from locations) locations ON zigbee2mqtt_devices.LOCATION_ID=locations.LOCID where TITLE<>"bridge" and selecttype<>"cc2531" '.$req_location.' '. $req_type.' '.$req_vendor. ' '.$req_vid. ' '.$req_group. ' order by DATE(FIND) DESC, SELECTVENDOR ';
//debmes($sql, 'zigbee2mqtt');
$res=SQLSelect( $sql);

Expand Down
Loading

0 comments on commit 51c5a45

Please sign in to comment.