Skip to content

Commit

Permalink
fix: skip null entity_ids for notify service
Browse files Browse the repository at this point in the history
closes #1878
closes #1889
closes #1929
  • Loading branch information
alandtse committed May 7, 2023
1 parent eb5a260 commit ed0c028
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/alexa_media/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def targets(self):
return devices
last_called_entity = None
for _, entity in account_dict["entities"]["media_player"].items():
if entity is None or entity.entity_id is None:
continue
entity_name = (entity.entity_id).split(".")[1]
devices[entity_name] = entity.unique_id
if self.last_called and entity.extra_state_attributes.get(
Expand Down

0 comments on commit ed0c028

Please sign in to comment.