diff --git a/custom_components/london_tfl/tfl_data.py b/custom_components/london_tfl/tfl_data.py index 40089a9..591f8f9 100644 --- a/custom_components/london_tfl/tfl_data.py +++ b/custom_components/london_tfl/tfl_data.py @@ -58,7 +58,7 @@ def filter_by_platform(self, filter_platform): if filter_platform != '': self._raw_result = [ item for item in self._raw_result - if filter_platform in item['platformName'] + if ('platformName' in item and filter_platform in item['platformName']) or ('lineName' in item and filter_platform in item['lineName']) ] def sort_data(self, max_items):