1
0
This commit is contained in:
Daniel Tartavel 2022-12-05 12:24:27 +01:00
parent a27db71327
commit 8974d3de84
2 changed files with 9 additions and 10 deletions

View File

@ -45,10 +45,9 @@ class etage_bureau_eclairage extends hook
//{ //{
logger(INFO, sprintf(_("publishing message: %s to %s"), json_encode($msg), $device->friendlyName)); logger(INFO, sprintf(_("publishing message: %s to %s"), json_encode($msg), $device->friendlyName));
$device->payload = $msg; $device->payload = $msg;
$device->set(); $device->set("state", $method);
$device->properties["state"]["method"] = $method; //$device->properties["state"]["method"] = $method;
if ($delayState !== false) setDelay($device, $this->delay, $this->timeUnit, "state", $delayState, true); if ($delayState !== false) setDelay($device, $this->delay, $this->timeUnit, "state", $delayState, true, IDLE);
//}else //}else
//{ //{

View File

@ -37,9 +37,9 @@ class etage_plan_travail_eclairage extends hook
//{ //{
logger(INFO, sprintf(_("publishing message: %s to %s"), json_encode($msg), $device->friendlyName)); logger(INFO, sprintf(_("publishing message: %s to %s"), json_encode($msg), $device->friendlyName));
$device->payload = $msg; $device->payload = $msg;
$device->set(); $device->set("state_l1", $method);
$device->properties["state_l1"]["method"] = $method; //$device->properties["state_l1"]["method"] = $method;
if ($delayState !== false) setDelay($device, $this->delay, $this->timeUnit, "state_l1", $delayState, true); if ($delayState !== false) setDelay($device, $this->delay, $this->timeUnit, "state_l1", $delayState, true, IDLE);
$device = & $indexDevices[ETAGE_CUISINE_PLAN_TRAVAIL_ECLAIRAGE]; $device = & $indexDevices[ETAGE_CUISINE_PLAN_TRAVAIL_ECLAIRAGE];
$msg = array("state" => $state); $msg = array("state" => $state);
@ -47,9 +47,9 @@ class etage_plan_travail_eclairage extends hook
//{ //{
logger(INFO, sprintf(_("publishing message: %s to %s"), json_encode($msg), $device->friendlyName)); logger(INFO, sprintf(_("publishing message: %s to %s"), json_encode($msg), $device->friendlyName));
$device->payload = $msg; $device->payload = $msg;
$device->set(); $device->set("state", $method);
$device->properties["state"]["method"] = $method; //$device->properties["state"]["method"] = $method;
if ($delayState !== false) setDelay($device, $this->delay, $this->timeUnit, "state", $delayState, true); if ($delayState !== false) setDelay($device, $this->delay, $this->timeUnit, "state", $delayState, true, IDLE);
//}else //}else