Hide cancelled trips from being displayed in vasttrafik integration (#43184)

pull/43199/head
Thomas 2020-11-13 17:51:33 +01:00 committed by GitHub
parent 71b8aad91b
commit 6e7b14f139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,8 @@ class VasttrafikDepartureSensor(Entity):
else:
for departure in self._departureboard:
line = departure.get("sname")
if "cancelled" in departure:
continue
if not self._lines or line in self._lines:
if "rtTime" in departure:
self._state = departure["rtTime"]