diff --git a/core/ajax/cmd.ajax.php b/core/ajax/cmd.ajax.php index d098eebf72..dc9c003878 100644 --- a/core/ajax/cmd.ajax.php +++ b/core/ajax/cmd.ajax.php @@ -246,8 +246,12 @@ } if (init('action') == 'byEqLogic') { - ajax::success(utils::o2a(cmd::byEqLogicId(init('eqLogic_id')))); - } + if (init('typeCmd')) { + ajax::success(utils::o2a(cmd::byEqLogicId(init('eqLogic_id'), init('typeCmd')))); + } else { + ajax::success(utils::o2a(cmd::byEqLogicId(init('eqLogic_id')))); + } + } if (init('action') == 'getCmd') { $cmd = cmd::byId(init('id')); diff --git a/core/js/eqLogic.class.js b/core/js/eqLogic.class.js index 9929347952..018593572c 100644 --- a/core/js/eqLogic.class.js +++ b/core/js/eqLogic.class.js @@ -298,7 +298,8 @@ jeedom.eqLogic.getCmd = function(_params) { paramsAJAX.url = 'core/ajax/cmd.ajax.php' paramsAJAX.data = { action: 'byEqLogic', - eqLogic_id: _params.id + eqLogic_id: _params.id, + ...(_params.typeCmd ? { typeCmd: _params.typeCmd } : {}) } domUtils.ajax(paramsAJAX) }