* ignore ignored services also when changes come in

This commit is contained in:
Ingo Fischer
2022-03-22 15:15:04 +01:00
parent f03bf3d9a6
commit d89288a0b8
+6 -1
View File
@@ -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 + '.';