diff --git a/core/class/zigate.class.php b/core/class/zigate.class.php index a671846..f4b2fc5 100644 --- a/core/class/zigate.class.php +++ b/core/class/zigate.class.php @@ -286,13 +286,23 @@ public function createCommands($device) array_push($created_commands, $key); break; case 'temperature': - $key = $this->_create_action($endpoint_id, $action, 'temperature', 'slider', [1700, 6500]); + $key = $this->_create_action($endpoint_id, $action, 'temperature', 'slider', [153, 500]); array_push($created_commands, $key); break; case 'hue': $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; } } } @@ -430,8 +440,8 @@ public function _create_command($endpoint_id, $cluster_id, $attribute) $cmd_info->setConfiguration('maxValue', 100); } if ($name == 'colour_temperature') { - $cmd_info->setConfiguration('minValue', 1700); - $cmd_info->setConfiguration('maxValue', 6500); + $cmd_info->setConfiguration('minValue', 153); + $cmd_info->setConfiguration('maxValue', 500); } break; case 'double': @@ -904,13 +914,17 @@ public function execute($_options = []) break; case 'temperature': - // min 1700 max 6500 - zigate::CallZiGate('action_move_temperature_kelvin', [$addr, $endpoint, $value]); + // mired : min 153 max 500 + zigate::CallZiGate('action_move_temperature', [$addr, $endpoint, $value]); break; 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]); diff --git a/plugin_info/info.json b/plugin_info/info.json index f9ec49d..2688df8 100644 --- a/plugin_info/info.json +++ b/plugin_info/info.json @@ -16,5 +16,5 @@ "documentation": "https://jeedom-zigate.github.io/jeedom-plugin-zigate", "language": ["fr_FR", "en_US"], "compatibility": ["Jeedomboard", "RPI/RPI2", "Docker", "DIY"], - "pluginVersion": "1.2.3-b3" + "pluginVersion": "1.2.3-b4" }