From 8e2154f2b5868a332a07425af3c174b5a5d210a0 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 24 Apr 2022 01:41:45 +0200 Subject: [PATCH] Do not overwrite an entity's state from an event if the state was not sampled --- .../http/webapp/src/components/panels/Entities/Index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue index b177a79f5..8c6cf1711 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Index.vue @@ -238,6 +238,8 @@ export default { this.clearEntityTimeouts(entityId) const entity = {...event.entity} + if (event.entity?.state == null) + entity.state = this.entities[entityId]?.state if (entity.meta?.name_override?.length) entity.name = entity.meta.name_override else if (this.entities[entityId]?.meta?.name_override?.length)