debugging
This commit is contained in:
@ -1,30 +1,15 @@
|
||||
<?php
|
||||
|
||||
class rdc_wc_eclairage
|
||||
class rdc_wc_eclairage extends hook
|
||||
{
|
||||
public $hookName = "rdc_wc_eclairage";
|
||||
public $active = true;
|
||||
|
||||
private $devicelist = array(RDC_SDB_WC_ECLAIRAGE => "state_l2");
|
||||
protected $devicelist = array(RDC_SDB_WC_ECLAIRAGE => array("state_l2", false));
|
||||
|
||||
public $delay = 3; // amount of time in $timeunit
|
||||
public $delayManual = 10; // amount of time in $timeunit for manual mode
|
||||
public $timeUnit = "minute"; // unit of time for delay, second, minute, day, week, month, year
|
||||
|
||||
function __construct()
|
||||
{
|
||||
global $indexDevices;
|
||||
|
||||
// assigne the function to the sensors devices
|
||||
if ($this->active === true)
|
||||
{
|
||||
foreach ($this->devicelist as $ieeeAddress => $property)
|
||||
{
|
||||
$indexDevices[$ieeeAddress]->$property["functions"][] = array($this,"callback");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// callback fonction. Is called with these 4 parameters
|
||||
public function callBack(&$device, $property, $value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user