diff --git a/custom_components/polestar_api/pypolestar/polestar.py b/custom_components/polestar_api/pypolestar/polestar.py index 81257a9..6175ffd 100644 --- a/custom_components/polestar_api/pypolestar/polestar.py +++ b/custom_components/polestar_api/pypolestar/polestar.py @@ -142,7 +142,7 @@ def get_cache_data(self, query: str, field_name: str, skip_cache: bool = False): cache_entry = self.cache_data[query] data = cache_entry['data'] if data is not None: - if skip_cache is False or cache_entry['timestamp'] + timedelta(seconds=CACHE_TIME) > datetime.now(): + if skip_cache is True or cache_entry['timestamp'] + timedelta(seconds=CACHE_TIME) > datetime.now(): return self._get_field_name_value(field_name, data) return None