Skip to content

Commit

Permalink
Update recorder_prefilter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gcobb321 authored Jul 10, 2024
1 parent 4e762f7 commit c006e5b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/icloud3/support/recorder_prefilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
VERSION = 1.0

def add_filter(hass: HomeAssistant, entities=None):
return False
'''
Inject the entity prefilter into the Recorder, remove Recorder listeners,
reinitialize the Recorder
Expand Down Expand Up @@ -86,6 +87,7 @@ def add_filter(hass: HomeAssistant, entities=None):


def remove_filter(hass: HomeAssistant, entities):
return True
if hass.data['recorder_prefilter']['legacy']:
try:
ha_recorder = hass.data['recorder_instance']
Expand All @@ -98,6 +100,7 @@ def remove_filter(hass: HomeAssistant, entities):


def _inject_filter(hass: HomeAssistant):
return False
ha_recorder = hass.data['recorder_instance']
rp_data = hass.data['recorder_prefilter']
recorder_entity_filter = ha_recorder.entity_filter
Expand Down Expand Up @@ -148,6 +151,7 @@ def entity_filter(entity_id):


def _update_filter(hass: HomeAssistant, entities=None, remove=False):
return
""" Update the filtered entity list """

mode = 'Removed' if remove else 'Added'
Expand Down

0 comments on commit c006e5b

Please sign in to comment.