Revert "Fix entity-state polling/discovery (#14793)" (#14811)

This reverts commit ebbb7cbdcf.
This commit is contained in:
Tony Murray
2023-01-26 18:43:45 -06:00
committed by GitHub
parent c2e248da55
commit 2f6d375652
2 changed files with 2 additions and 2 deletions

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_assoc($state, $db_state);
$update = array_diff($state, $db_state);
if (! empty($update)) {
if (array_key_exists('entStateLastChanged', $update) && is_null($update['entStateLastChanged'])) {

View File

@@ -64,7 +64,7 @@ if (! empty($entityStatesIndexes)) {
->format('Y-m-d H:i:s');
// check if anything has changed
$update = array_diff_assoc(
$update = array_diff(
$new_states,
dbFetchRow(
'SELECT * FROM entityState WHERE entity_state_id=?',