Skip to content

Commit

Permalink
Update magichome.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
directman66 committed Nov 13, 2018
1 parent 3ec6243 commit 6e30971
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/magichome/magichome.class.php
Expand Up @@ -275,8 +275,11 @@ function propertySetHandle($object, $property, $value) {
// if ($type=='AK001-ZJ100') {
// if ($type=='AK001-ZJ100') {
//sg('test.substr', substr($type,0,8));
//sg('test.mg', substr($type,0,8).":". $command.":".$value);
if (substr($type,0,8)=='AK001-ZJ') {

//sg('test.mg', substr($type,0,8).":". $command.":".$value);

/*
if ($meth=='turnOn') {
$magichomeObject->turnon($deviceid);
Expand All @@ -294,10 +297,10 @@ function propertySetHandle($object, $property, $value) {
else { $magichomeObject->turnoff($deviceid);}
$magichomeObject->getinfo2($deviceid);
}
*/




if ($command=='status'&& $value=='1') {
$magichomeObject->turnon($deviceid);
$magichomeObject->getinfo2($deviceid);
Expand Down

0 comments on commit 6e30971

Please sign in to comment.