Commit Graph

27 Commits (84fe356782baa14e138e6804cb5cd25893f98c3f)

Author SHA1 Message Date
Emilv2 cfe6185c1c
Bump pydelijn to 1.1.0 (#95878) 2023-07-05 08:35:02 +02:00
Erik Montnemery 87420e949d
Sort manifests 2 (#87023) 2023-02-08 20:16:39 +01:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
epenet bf7239c25d
Improve entity type hints [d] (#77031) 2022-08-19 16:10:45 +02:00
Bram Goolaerts 17eb8c95dd
Fix De Lijn 'tzinfo' error (#73502)
* 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
2022-06-15 10:33:53 +02:00
Franck Nijhof e386f4846d
Update delijn to 1.0.0 (#65776)
* Update delijn to 1.0.0

* -1
2022-02-05 13:31:04 +01:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
epenet 84221f656a
Add sensor setup type hints [c-d] (#63318)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:16:42 +01:00
epenet b5c5528082
Optimise state attributes in delijn (#61424) 2021-12-10 10:13:21 +01:00
epenet 5b8f8772d2
Use _attr_* in delijn (#61344)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-09 11:39:57 +01:00
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
Erik Montnemery 41f3c2766c
Move temperature conversions to entity base class (2/8) (#54468) 2021-08-11 18:57:12 +02:00
Franck Nijhof 258b388f41
Collection of changing entity properties to class attributes (#51248)
* 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>
2021-05-31 10:50:11 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery 23b562386f
Migrate integrations d-e to extend SensorEntity (#48211) 2021-03-22 12:52:29 +01:00
Erik Montnemery 6c084ae6ce
Update integrations a-e to override extra_state_attributes() (#47756) 2021-03-11 16:51:03 +01:00
tkdrob 6e9aa254d5
Use core constants for delijn (#46027) 2021-02-04 21:43:04 -05:00
Emilv2 a695dc20fd
Bump pydelijn to 0.6.1 (#39802) 2020-09-08 16:18:34 +02:00
Emilv2 3b606504a8
Add new is_reatime attribute for De Lijn (#36369) 2020-06-03 09:52:20 -06:00
Emilv2 0ae23fa166
Remove duplicate information in delijn sensor (#36276) 2020-05-31 10:02:56 -05:00
Emilv2 53a9d39a81
Fix Delijn sensor naming (#35789) 2020-05-20 14:53:01 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Emilv2 c968e455a9
Fix delijn sensor stuck on last passage (#32710)
* 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
2020-03-12 14:43:52 -07:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Ville Skyttä a54ade1189 Spelling fixes (#25666) 2019-08-02 23:20:06 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Bram Goolaerts 0fc2813177 Add De Lijn (Flemish Public Transport) component (#24265)
* 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)
2019-07-26 16:41:02 +02:00