1
0

debbuging hooks

This commit is contained in:
2022-09-09 16:53:19 +02:00
parent 7eaaad0911
commit 918a571b5c
7 changed files with 304 additions and 289 deletions

View File

@@ -44,10 +44,9 @@ class rdc_salon_eclairage extends hook
switch($param)
{
case "presence":
logger(INFO, _("CASE: Présence => ") . bool2string($value), __FILE__ . ":" . __LINE__);
case "occupancy":
$method = $deviceTarget->properties["state"]["method"];
logger(INFO, _("CASE: Occupancy => ") . bool2string($value), __FILE__ . ":" . __LINE__);
logger(INFO, sprintf (_("CASE: %s => "), $param) . bool2string($value), __FILE__ . ":" . __LINE__);
//print_r(getValue(RDC_SALON_LUMINOSITE, "illuminance_lux"));
if ($value == ON and $method == IDLE)
{
@@ -60,8 +59,8 @@ class rdc_salon_eclairage extends hook
}
}else
{
logger(INFO, _("Value is OFF"), __FILE__ . ":" . __LINE__);
if (testActionneurs($this->actionneurs) === false and $method == AUTO)
logger(INFO, _("Value is OFF and method is ") . $method, __FILE__ . ":" . __LINE__);
if ((testActionneurs($this->actionneurs) == false) and ($method == AUTO))
//if ((getValue(RDC_SALON_MVMT, "occupancy") == OFF) and (getValue(RDC_SALON_MVMT2, "occupancy") == OFF) and $method == AUTO)
{
logger(INFO, _("Setting to OFF"), __FILE__ . ":" . __LINE__);