Skip to content

Commit

Permalink
Fix entity_id is None error
Browse files Browse the repository at this point in the history
  • Loading branch information
gcobb321 authored Jul 4, 2024
1 parent ed91778 commit 27b4b17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/icloud3/support/recorder_prefilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ def entity_filter(entity_id):
Run the original HA recorder_entity_filter function -
The entity is not in the filter list.
"""
if (entity_id
and entity_id in hass.data['recorder_prefilter']['exclude_entities']):
if entity_id is None:
return False
if entity_id in hass.data['recorder_prefilter']['exclude_entities']):
return False

return recorder_entity_filter(entity_id)
Expand Down

0 comments on commit 27b4b17

Please sign in to comment.