From 76698e0ff8f3a019e7c00decba7ed37ab72cd488 Mon Sep 17 00:00:00 2001 From: Mohak Kataria Date: Wed, 24 Jul 2024 10:39:26 +0100 Subject: [PATCH] Allow platform filter on buses --- custom_components/london_tfl/tfl_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):