* Fix De Lijn component tzinfo error
This fix should update the issue "Error:'str' object has no attribute 'tzinfo'" (issue #67455)
* fix Black and isort errors
fixing errors from Black and isort CI validation
* Fix black and flake8 issues
Fixing black and flake8 issues to pass CI
* 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>
* Collection of changing entity properties to class attributes
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix delijn sensor stuck on last passage
If the returned passage is an empty list that means there are
no next passages, so the sensor should be updated accordingly
* Mark the sensor as unavailable instead of emptying data
* use available property
* add available property
* Initial commit of De Lijn (Flemish Public Transport) component
* Code corrections as per HA dev's requests
* changes to variable naming, setting attribution and states, plus some smaller optimizations
* Overlooked some linting issues, these are now fixed
* Updated pydelijn version requirement to 0.5.1 so UTC timestamps can be used instead of relative/local times.
Removed unused definition
* Updated pydelijn version requirement to 0.5.1 in requirements_all.txt
* Update the self._attributes dict directly instead of replacing it
Assign ATTRIBUTION while creating the _attributes dict
Remove the ATTRIBUTION assignment in device_state_attributes as it's updated in the async_update now.
* Linting issue (lenght of 2 lines) solved
* Removed a relative time attribute
Updated a linting issue in the LOGGER (used % instead of the format)