debugging
This commit is contained in:
		@@ -23,7 +23,7 @@ class rdc_sdb_eclairage extends hook
 | 
			
		||||
		RDC_SDB_WC_ECLAIRAGE => array("state_l1", false)
 | 
			
		||||
	);
 | 
			
		||||
 | 
			
		||||
	// callback fonction. Is called with these 4 parameters
 | 
			
		||||
	// callback fonction. Is called with these 3 parameters
 | 
			
		||||
	public function callBack(&$device, $property, $value)
 | 
			
		||||
	{
 | 
			
		||||
		global $devices, $indexDevices;
 | 
			
		||||
@@ -33,19 +33,22 @@ class rdc_sdb_eclairage extends hook
 | 
			
		||||
			case "occupancy":
 | 
			
		||||
				if ($value == ON)
 | 
			
		||||
				{
 | 
			
		||||
					$this->send("ON");
 | 
			
		||||
					setDelay($device, $this->delay, $this->timeUnit, "state_l1", "OFF", true);
 | 
			
		||||
					if (getValue(RDC_SDB_WC_ECLAIRAGE, "state_l1") != "ON")
 | 
			
		||||
					{
 | 
			
		||||
						$this->send("ON");
 | 
			
		||||
					}
 | 
			
		||||
					//setDelay($indexDevices[RDC_SDB_WC_ECLAIRAGE], $this->delay, $this->timeUnit, "state_l1", "OFF", true);
 | 
			
		||||
					$device->method = AUTO;
 | 
			
		||||
				}
 | 
			
		||||
				break;
 | 
			
		||||
			case "state_l1":
 | 
			
		||||
				if ($value == ON)
 | 
			
		||||
				{
 | 
			
		||||
					setDelay($device, $this->delayManual, $this->timeUnit, "state_l1", "OFF", true);
 | 
			
		||||
					setDelay($indexDevices[RDC_SDB_WC_ECLAIRAGE], $this->delayManual, $this->timeUnit, "state_l1", "OFF", true);
 | 
			
		||||
					$device->method = MANUAL;
 | 
			
		||||
				}elseif ($value = OFF)
 | 
			
		||||
				{
 | 
			
		||||
					deleteEvent(searchEvent($device, "state_l1", "OFF"));
 | 
			
		||||
					removeEvent($indexDevices[RDC_SDB_WC_ECLAIRAGE], "state_l1", "OFF");
 | 
			
		||||
				}
 | 
			
		||||
				break;
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user