a lot of bugs corrected\nrdc_wc_eclairage
This commit is contained in:
		@@ -5,26 +5,28 @@ class alerte_intrusion extends hook
 | 
			
		||||
	public $active = true;
 | 
			
		||||
 | 
			
		||||
	protected $devicelist = array(
 | 
			
		||||
		ENTREE_PORTE => array("contact", false),
 | 
			
		||||
		GARAGE_PORTE => array("contact", false),
 | 
			
		||||
		RDC_CHAMBRE_BAIE => array("contact", false),
 | 
			
		||||
		RDC_SALON_BAIE => array("contact", false));
 | 
			
		||||
		ENTREE_PORTE => "contact",
 | 
			
		||||
		GARAGE_PORTE => "contact",
 | 
			
		||||
		RDC_CHAMBRE_BAIE => "contact",
 | 
			
		||||
		RDC_SALON_BAIE => "contact"
 | 
			
		||||
		);
 | 
			
		||||
 | 
			
		||||
	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
 | 
			
		||||
 | 
			
		||||
	// callback fonction. Is called with these 4 parameters
 | 
			
		||||
	public function callBack($device, $param, $value)
 | 
			
		||||
	public function callBack($device, $property, $value)
 | 
			
		||||
	{
 | 
			
		||||
		switch($param)
 | 
			
		||||
 | 
			
		||||
		switch($property)
 | 
			
		||||
		{
 | 
			
		||||
			case "contact":
 | 
			
		||||
				if ($value == false)
 | 
			
		||||
				{
 | 
			
		||||
					logger(ALERT, sprintf(_("%s est ouverte alors que personne n'est présent"), $device->friendlyName), __FILE__ . ":" . __LINE__);
 | 
			
		||||
				}
 | 
			
		||||
				break;
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user