Fix entity-state polling/discovery (#14793)

This commit is contained in:
fdomain
2023-01-19 15:14:29 +01:00
committed by GitHub
parent 4a97c67b92
commit ebbb7cbdcf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ if (! empty($entPhysical)) {
if (isset($db_states[$id])) { // update the db
$db_state = $db_states[$id];
$update = array_diff($state, $db_state);
$update = array_diff_assoc($state, $db_state);
if (! empty($update)) {
if (array_key_exists('entStateLastChanged', $update) && is_null($update['entStateLastChanged'])) {
+1 -1
View File
@@ -64,7 +64,7 @@ if (! empty($entityStatesIndexes)) {
->format('Y-m-d H:i:s');
// check if anything has changed
$update = array_diff(
$update = array_diff_assoc(
$new_states,
dbFetchRow(
'SELECT * FROM entityState WHERE entity_state_id=?',