1
0

pws2mqtt is fonctional\ndebugging

This commit is contained in:
2022-01-08 23:45:38 +01:00
parent e7618f9d86
commit 7acec3a3c4
5 changed files with 56 additions and 17 deletions

View File

@ -138,7 +138,7 @@ function iterateDevice($topic, $fn, &$device, $payloadArray)
//echo "device =>";print_r($device);echo EOL;
foreach($payloadArray as $key => $value)
{
$oldValue = 0;
$oldValue = null;
//echo "key =>"; print_r($key); echo EOL;
//echo "value =>"; print_r($value); echo EOL;
@ -170,7 +170,7 @@ function iterateDevice($topic, $fn, &$device, $payloadArray)
$device->{$key}["value"] = null;
$device->$key["functions"] = array();
}
if ($oldValue != $value)
if ($oldValue !== $value)
{
$device->$key["value"] = $value;
$changed[$fn]["key"] = $key;