From d89288a0b87b5d26af9eb6ea7267378f42501511 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Tue, 22 Mar 2022 15:15:04 +0100 Subject: [PATCH] * ignore ignored services also when changes come in --- main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 046782d..0ded1ee 100644 --- a/main.js +++ b/main.js @@ -371,7 +371,12 @@ function main() { hass.on('state_changed', entity => { adapter.log.debug(`HASS-Message: State Changed: ${JSON.stringify(entity)}`); - if (!entity) { + if (!entity || typeof entity.entity_id !== 'string') { + return; + } + const serviceType = entity.entity_id.split('.')[0]; + + if (skipServices.includes(serviceType)) { return; } const id = adapter.namespace + '.entities.' + entity.entity_id + '.';