debugging api and add notify command
This commit is contained in:
@ -9,10 +9,10 @@ class rdc_chambre_eclairage extends hook
|
||||
public $luminance_min = 60;
|
||||
public $luminance_max = 3000;
|
||||
protected $devicelist = array(
|
||||
"RDC_CHAMBRE_AMBIANCE" => array("state", false), // "ON"/"OFF"
|
||||
"RDC_CHAMBRE_ECLAIRAGE" => array("state_l1", false), // "ON"/"OFF"
|
||||
"RDC_CHAMBRE_MVMT" => array("occupancy", false),
|
||||
"RDC_CHAMBRE_ARMOIRE_GAUCHE" => array("contact", false)
|
||||
RDC_CHAMBRE_AMBIANCE => array("state", false), // "ON"/"OFF"
|
||||
RDC_CHAMBRE_ECLAIRAGE => array("state_l1", false), // "ON"/"OFF"
|
||||
RDC_CHAMBRE_MVMT => array("occupancy", false),
|
||||
RDC_CHAMBRE_ARMOIRE_GAUCHE => array("contact", false)
|
||||
);
|
||||
|
||||
// callback fonction. Is called with these 3 parameters
|
||||
@ -26,7 +26,7 @@ class rdc_chambre_eclairage extends hook
|
||||
if ($property == "occupancy" and $value == "ON")
|
||||
{
|
||||
$this->send(RDC_CHAMBRE_AMBIANCE, "ON", "OFF", AUTO);
|
||||
}elseif ($property == "contact" and $value = true and getValue(RDC_CHAMBRE_ECLAIRAGE) == "OFF")
|
||||
}elseif ($property == "contact" and $value = true and getValue(RDC_CHAMBRE_ECLAIRAGE, "state_l1") == "OFF")
|
||||
{
|
||||
$this->send(RDC_CHAMBRE_ECLAIRAGE, "ON", "OFF", AUTO);
|
||||
}
|
||||
|
Reference in New Issue
Block a user