mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
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:
commit
f049c8d5db
2 changed files with 6 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
|||
"config_flow": true,
|
||||
"dependencies": [],
|
||||
"codeowners": ["@basnijholt", "@RubenKelevra"],
|
||||
"version": "1.0.17",
|
||||
"version": "1.0.18",
|
||||
"requirements": [],
|
||||
"iot_class": "calculated"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue