Skip to content

Commit 9201118

Browse files
authored
bugfix
1 parent 0065613 commit 9201118

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

core/class/ajaxSystem.class.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ public function execute($_options = array()) {
391391
if(!isset($command['command']) || $command['command'] == ''){
392392
$command['command'] = $this->getLogicalId();
393393
}
394+
if(isset(explode(" ", $this->getLogicalId())[1]) && explode(" ", $this->getLogicalId())[1] != ""){
395+
if(!isset($command['AdditionalParam'])){
396+
$command['AdditionalParam'] = array();
397+
}
398+
$command['AdditionalParam']['ChannelsAdditionalParam'] = "CHANNEL_".explode(" ", $this->getLogicalId())[1];
399+
}
394400
log::add('ajaxSystem','debug','Command send to ajax : '.json_encode($command));
395401
ajaxSystem::request('/user/{userId}/hubs/' . $eqLogic->getConfiguration('hub_id') . '/devices/' . $eqLogic->getLogicalId() . '/command', $command, 'POST');
396402
} else if ($eqLogic->getConfiguration('type') == 'group') {

core/config/devices/LightSwitchTwoWay.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@
8888
"template":{
8989
"dashboard" : "prise",
9090
"mobile" : "prise"
91-
},
92-
"configuration" :{
93-
"AdditionalParam" : {
94-
"ChannelsAdditionalParam" : "CHANNEL_2"
95-
}
9691
}
9792
},
9893
{
@@ -106,11 +101,6 @@
106101
"template":{
107102
"dashboard" : "prise",
108103
"mobile" : "prise"
109-
},
110-
"configuration" :{
111-
"AdditionalParam" : {
112-
"ChannelsAdditionalParam" : "CHANNEL_2"
113-
}
114104
}
115105
}
116106
]

0 commit comments

Comments
 (0)