core/homeassistant/components/delijn
ericvb 570f80a73c
Check early for empty passages in delijn (#59612)
* Add a check to verify if there is a passage

Late in the evening and at night, there can be no passages anymore, so check it to avoid an unnecessary exception

* One passage is enough! 

Requesting minimum 2 passages was an error due to counting from 1 and not zero

* Invert check and put it out of the try-catch code

Adding also the KeyError in the log message

* Clean up

* Putting comment in the correct python syntax

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-14 03:22:36 +01:00
..
__init__.py
manifest.json
sensor.py Check early for empty passages in delijn (#59612) 2021-11-14 03:22:36 +01:00