From 366a0bf0dfc573dc2344a67921902f2869a238ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20RAMAGE?= Date: Mon, 4 Mar 2019 14:56:57 +0100 Subject: [PATCH] Add cover support --- core/class/zigate.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/class/zigate.class.php b/core/class/zigate.class.php index 15053d9..f4b2fc5 100644 --- a/core/class/zigate.class.php +++ b/core/class/zigate.class.php @@ -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; } } } @@ -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]);