1
0

- added values in celsius degree and in km/h in pws2mqtt

- debug of hooks
-added webserver.php
This commit is contained in:
2022-01-27 18:41:16 +01:00
parent fc4eaf2238
commit 1361cb9395
13 changed files with 214 additions and 57 deletions

View File

@ -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;

View File

@ -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());
}