Skip to content

Commit

Permalink
Update zigbee2mqtt.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
directman66 committed Apr 9, 2019
1 parent 338daff commit c4197c5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions modules/zigbee2mqtt/zigbee2mqtt.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,20 @@ function saveParams($data=0) {
*/
function getParams() {
global $id;
global $ieee;

global $mode;
global $view_mode;
global $edit_mode;
global $tab;
if (isset($id)) {
$this->id=$id;
}

if (isset($ieee)) {
$this->ieee=$ieee;
}

if (isset($mode)) {
$this->mode=$mode;
}
Expand Down Expand Up @@ -1092,6 +1099,14 @@ function admin(&$out) {
$this->redirect("?");
}


if ($this->view_mode=='delete_dev_z2m') {
$this->sendcommand('zigbee2mqtt/bridge/config/remove', $this->ieee);
$this->delete_dev($this->id);
$this->redirect("?");
}


if ($this->view_mode=='delete_mqtt') {
$this->delete_mqtt($this->id);
// $this->redirect("?");
Expand Down

0 comments on commit c4197c5

Please sign in to comment.