Skip to content

Commit

Permalink
some channels relays fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nick7zmail committed Dec 11, 2018
1 parent 8e4e1e5 commit 638088b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file added img/sonoff/1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/sonoff/2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions modules/dev_sonoff/dev_sonoff.class.php
Expand Up @@ -275,9 +275,9 @@ function propertySetHandle($object, $property, $value) {
$payload['userAgent']='app';
$payload['apikey']=$this->config['APIKEY'];
$payload['deviceid']=$device['DEVICEID'];
if(strpos($properties['TITLE'], 'switch')!==false && $properties['TITLE']!='switches') {
$dev_arr=explode('.', $properties['TITLE']);
$payload['params']['switches'][0]['outlet']=$dev_arr[1];
if(strpos($param, 'switch.')!==false) {
$dev_arr=explode('.', $param);
$payload['params']['switches'][0]['outlet']=intval($dev_arr[1]);
$payload['params']['switches'][0]['switch']=$this->metricsModify($param, $value, 'to_device');
} else {
$payload['params'][$param]=$this->metricsModify($param, $value, 'to_device');
Expand Down

0 comments on commit 638088b

Please sign in to comment.