From 6e10c2b5db1b545197bd83b1b246b39179d64b83 Mon Sep 17 00:00:00 2001 From: Mihail Morosan Date: Fri, 31 May 2024 12:49:55 +0100 Subject: [PATCH] Favour using towards instead of destinationName. --- custom_components/london_tfl/tfl_data.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/custom_components/london_tfl/tfl_data.py b/custom_components/london_tfl/tfl_data.py index fa02ed2..6ddb8d5 100644 --- a/custom_components/london_tfl/tfl_data.py +++ b/custom_components/london_tfl/tfl_data.py @@ -3,11 +3,10 @@ def get_destination(entry): + if 'towards' in entry: + return entry['towards'] if 'destinationName' in entry: return entry['destinationName'] - else: - if 'towards' in entry: - return entry['towards'] return ''