Skip to content

Commit

Permalink
Merge pull request #30 from mohakkataria/patch-1
Browse files Browse the repository at this point in the history
Allow platform filter on buses
  • Loading branch information
morosanmihail authored Jul 28, 2024
2 parents bc9018d + 76698e0 commit 7d52d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/london_tfl/tfl_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7d52d1b

Please sign in to comment.