Merge pull request #324 from basnijholt/service_data_empty

Take care of edge case where no area_id or entity_id in service_data
This commit is contained in:
Bas Nijholt 2022-08-30 09:50:26 -07:00 committed by GitHub
commit f049c8d5db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -6,7 +6,7 @@
"config_flow": true,
"dependencies": [],
"codeowners": ["@basnijholt", "@RubenKelevra"],
"version": "1.0.17",
"version": "1.0.18",
"requirements": [],
"iot_class": "calculated"
}

View file

@ -1291,6 +1291,11 @@ class TurnOnOffListener:
_LOGGER.debug(
"Found entity_ids '%s' for area_id '%s'", entity_ids, area_id
)
else:
_LOGGER.debug(
"No entity_ids or area_ids found in service_data: %s", service_data
)
return
if not any(eid in self.lights for eid in entity_ids):
return