hooks are now in array
This commit is contained in:
@@ -8,7 +8,7 @@ function checkEvents()
|
||||
{
|
||||
if (!empty($event->dateTimeEvent) and $event->dateTimeEvent <= now())
|
||||
{
|
||||
echo "---->sending command" . EOL;
|
||||
echo "---->sending command set " . $event->param . "=>" . $event->value . " to " . $event->device->friendlyName . EOL;
|
||||
publish($event->device, array($event->param => $event->value), "set", $key);
|
||||
//$event->published = now();
|
||||
//echo "#################################\nUnsetting event $key \n###########################" . EOL;
|
||||
@@ -25,10 +25,10 @@ function setDelay(&$device, $delay, $unit="sec", $param, $value, $replace=false)
|
||||
//print_r($datetime);
|
||||
switch($unit)
|
||||
{
|
||||
case "sec":
|
||||
case "second":
|
||||
$unit = "S";
|
||||
break;
|
||||
case "min":
|
||||
case "minute":
|
||||
$unit = "M";
|
||||
break;
|
||||
case "hour":
|
||||
@@ -68,7 +68,7 @@ function setDelay(&$device, $delay, $unit="sec", $param, $value, $replace=false)
|
||||
|
||||
|
||||
|
||||
function searchEvent($device, $param , $value): int
|
||||
function searchEvent($device, $param , $value)
|
||||
{
|
||||
global $events;
|
||||
echo "searching event" . EOL;
|
||||
@@ -85,6 +85,7 @@ function searchEvent($device, $param , $value): int
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function deleteEvent($eventKey)
|
||||
|
Reference in New Issue
Block a user