Skip to content

Commit

Permalink
Add cover support
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Mar 4, 2019
1 parent 04ac334 commit 366a0bf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/class/zigate.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,16 @@ public function createCommands($device)
$key = $this->_create_action($endpoint_id, $action, 'hue', 'color');
array_push($created_commands, $key);
break;
case 'cover':
$key = $this->_create_action($endpoint_id, $action, 'open', 'other', 0);
array_push($created_commands, $key);

$key = $this->_create_action($endpoint_id, $action, 'close', 'other', 1);
array_push($created_commands, $key);

$key = $this->_create_action($endpoint_id, $action, 'stop', 'other', 2);
array_push($created_commands, $key);
break;
}
}
}
Expand Down Expand Up @@ -911,6 +921,10 @@ public function execute($_options = [])
case 'hue':
zigate::CallZiGate('action_move_hue_hex', [$addr, $endpoint, $value]);
break;

case 'cover':
zigate::CallZiGate('action_cover', [$addr, $endpoint, $value]);
break;

case 'refresh':
zigate::callZiGate('refresh_device', [$addr]);
Expand Down

0 comments on commit 366a0bf

Please sign in to comment.