- added values in celsius degree and in km/h in pws2mqtt
- debug of hooks -added webserver.php
This commit is contained in:
14
class/db.php
14
class/db.php
@ -50,18 +50,12 @@ class db extends mysqli
|
||||
{
|
||||
// calculate a min/max value for storing data
|
||||
|
||||
$var = $properties2log[$propertyTree];
|
||||
if (is_callable($var))
|
||||
$minMax = $properties2log[$propertyTree];
|
||||
if (is_callable($minMax))
|
||||
{
|
||||
$var = $var($value);
|
||||
$minMax = $minMax($value);
|
||||
}
|
||||
//if (!is_numeric($var))
|
||||
//{
|
||||
$minMax = (float)$value + $var;
|
||||
//}else
|
||||
//{
|
||||
// $minMax = $var;
|
||||
//}
|
||||
|
||||
echo "minMax = " .$minMax . EOL;
|
||||
//echo "oldValue = " . $oldValue . EOL;
|
||||
//echo "Value = " . $value . EOL;
|
||||
|
@ -33,8 +33,9 @@ class device
|
||||
public $payload;
|
||||
public $availability;
|
||||
public $toConfirm;
|
||||
public $triggerDevice;
|
||||
|
||||
private function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
$this->availability = array("value" => null, "functions" => array());
|
||||
}
|
||||
|
Reference in New Issue
Block a user