Commit graph

60 commits

Author SHA1 Message Date
Cyrill Raccaud
62773fa88a
Simplify Swiss public transport coordinator (#128891) 2024-10-21 14:15:18 +02:00
Cyrill Raccaud
110751e992
Use runtime_data for Swiss Public Transport (#128369)
* use runtime_data instead of hass.data[<key>]

* fix service response export type

* reduce runtime_data to be just the coordinator

* fix rebase

* fix ruff

* address reviews

* address reviews

* no general core import

* no general config_entries import

* fix also for services

* remove untyped config entry

* remove unneeded cast
2024-10-21 11:50:22 +02:00
Cyrill Raccaud
c3e7fcc153
Response type should not contain datetime for Swiss Public Transport (#128391)
* response type should not contain datetime

* use isoformat
2024-10-15 07:35:05 +02:00
polgarc
c4cc9f8489
Add line numbers to swiss-public-transport (#127332)
* add line numbers

* keep only one line sensor

* fix unt tests
2024-10-03 01:25:17 +02:00
Cyrill Raccaud
acd3710469
Bump swiss-public-transport requirement python-opendata-transport to 0.5.0 (#127306) 2024-10-02 15:42:04 +02:00
Erik Montnemery
38ef216894
Update icons.json to new service schema part 4 (#124771) 2024-08-28 13:48:13 +02:00
Cyrill Raccaud
200f04bf21
Fix startup block from Swiss public transport (#123704) 2024-08-12 17:01:06 +02:00
Cyrill Raccaud
0803ac9b0b
Add Swiss public transport fetch connections service (#114671)
* add service to fetch more connections

* improve error messages

* better errors

* wip

* fix service register

* add working tests

* improve tests

* temp availability

* test availability

* remove availability test

* change error type for coordinator update

* fix missed coverage

* convert from entity service to integration service

* cleanup changes

* add more tests for the service
2024-08-12 11:26:42 +02:00
Cyrill Raccaud
59dd63ea86
Remove deprecated attributes from Swiss public transport integration (#120256) 2024-06-24 11:18:10 +02:00
Cyrill Raccaud
7efd1079bd
Add Swiss public transport via stations (#115891)
* add via stations

* bump minor version due to backwards incompatibility

* better coverage of many via station options in unit tests

* fix migration unit test for new minor version 1.3

* switch version bump to major and improve migration test

* fixes

* improve error messages

* use placeholders for strings
2024-06-23 19:26:55 +02:00
Joost Lekkerkerker
cfbc854c84
Remove deprecated import swiss public transport import flow (#119813) 2024-06-17 13:24:10 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
lunmay
0e202770e3
Brand name typo in swiss_public_transport (#115000) 2024-04-06 08:12:44 +02:00
Cyrill Raccaud
bf9627ad07
Add extra sensors to Swiss Public Transport (#114636)
* convert extra_state_attributes to sensors

* add deprecation notice for extra state attributes

* cleanup after comments

* remove exists_fn as it does not add value

* move function outside the class
2024-04-02 21:35:11 +02:00
Joost Lekkerkerker
e1bff6dac4
Fix Swiss public transport feedback (#114373) 2024-03-28 11:11:28 +01:00
Cyrill Raccaud
e136847b89
Add more timestamp sensors to swiss_public_transport (#107916)
* add more timestamp sensors

* more generic definition for future sensors

* add entity descriptor

* use enable property to prevent sensors from getting added

* set legacy attribute flag for first sensor

* remove departure from extra attributes

* remove breaking changes again and keep for next pr

* fix multiline statements

* outsource the multiline ifs into function

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-26 10:17:25 +01:00
Marc Mueller
2c06d4fcb9
Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Marc Mueller
930a396712
Add empty line after module docstring [s] (#112704) 2024-03-08 14:33:51 +01:00
Joost Lekkerkerker
f0487da6f6
Add icon translations to Swiss public transport (#112254) 2024-03-04 16:58:38 +01:00
Erik Montnemery
b0ed8c4961
Migrate integrations s-t to generic flowhandler (#111865) 2024-02-29 22:16:14 +01:00
Cyrill Raccaud
c0a7aacfa8
Cleanup swiss_public_transport error logging (#111741) 2024-02-28 19:42:25 +01:00
J. Nick Koston
6b913546b9
Update swiss_public_transport to set ConfigEntry version with async_update_entry (#110197) 2024-02-10 19:54:35 +01:00
Cyrill Raccaud
f22b71d803
Follow up swiss_public_transport migration fix of unique ids (#107873)
improve migration fix of unique ids
- follow up to #107087
2024-02-02 10:37:49 +01:00
Cyrill Raccaud
802f0da493
Switch for swiss_public_transport to unique_id instead of unique_entry (#107910)
* use unique_id instead of unique_entry

* move entry mock out of patch context
2024-01-17 19:08:33 +01:00
Cyrill Raccaud
96a9ebf137
Fix missing unique_id for spt integration (#107087)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-12 12:55:09 +01:00
Cyrill Raccaud
598e18ca86
Set proper sensor device class for swiss_public_transport (#106485)
set proper sensor device class
2024-01-10 13:23:02 +01:00
Cyrill Raccaud
3139e92696
Fix Swiss public transport initial data for attributes (#107452)
faster initial data for attributes
2024-01-07 16:19:58 +01:00
Cyrill Raccaud
1d9a2b53e7
Remove initial entity update from swiss_public_transport (#106478)
remove initial update
2023-12-27 15:28:59 +01:00
Cyrill Raccaud
ed3ea5e5f4
Add device to swiss public transport (#106475)
add to device registry
2023-12-27 15:08:58 +01:00
Cyrill Raccaud
b935facec8
Add coordinator to Swiss public transport (#106278) 2023-12-27 12:54:41 +01:00
Joost Lekkerkerker
f92e732f27
Use translation placeholders in Swiss public transport (#106416) 2023-12-27 09:01:53 +01:00
Cyrill Raccaud
181190d22d
Log when swiss_public_transport loses connection (#106200)
* better handling of sensor init state

* sensor.py use integrated attr

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* use parents implementation for availability

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-22 17:11:49 +01:00
Joost Lekkerkerker
989a7e7b10
Clean up swiss public transport (#106245) 2023-12-22 15:59:01 +01:00
Cyrill Raccaud
9fbc15c28b
Bump python-opendata-transport to 0.4.0 (#106199)
bump version to 0.4.0
2023-12-21 22:17:43 +01:00
Cyrill Raccaud
7e685f2bc7
Swiss public transport config flow (#105648)
* add config flow

* unit tests

* yaml config import flow

* change deprecation period and simply code

* keep name for legacy yaml
- removing the name now would break current implementations
- it will be removed together with the deprectation of  yaml config flow

* improve error handling, simpler unique_id, cleanup

* simplify issues for yaml import flow

* improve typing and clean name handling

* streamline unit tests
- happy path + errors
- mock opendata instead of aiohttp

* parametrize unit tests

* improve strings

* add missing aborts

* update coverage ignore

* remove redundant test

* minor clean up of constants
2023-12-21 20:38:00 +01:00
J. Nick Koston
7995d3777a
Fix package names to match pypi index metadata (#93883)
* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* uses _

* uses -

* fix metadata
2023-05-31 21:12:53 -04:00
epenet
d0c38c1e12
Move icon constants to entity attributes (#90518)
* Move icon constants to attribute

* Adjust test
2023-03-31 09:34:17 +02:00
Erik Montnemery
23fa500406
Sort manifests 9 (#87030) 2023-02-08 20:22:30 +01:00
epenet
c37e4b870f
Move attribution to standalone attribute [r-s] (#80520)
* Move attribution to standalone attribute [r-s]

* Fix test
2022-10-18 13:33:20 +02:00
epenet
3ec231c911
Improve entity type hints [s] (part 2/2) (#77882) 2022-09-06 13:36:44 +02:00
J. Nick Koston
5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
Stefan Agner
efc0d0265d
Upgrade python_opendata_transport to 0.3.0 (#63409) 2022-01-05 14:52:25 +01:00
epenet
595e8a327c
Add sensor setup type hints [s] (#63310)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:06:08 +01:00
Erik Montnemery
94a264afaf
Move temperature conversions to entity base class (7/8) (#54482) 2021-08-11 18:57:50 +02:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery
64bc9a8196
Migrate integrations r-s to extend SensorEntity (#48215) 2021-03-22 19:54:14 +01:00
Erik Montnemery
14ff6d4d1f
Update integrations p-s to override extra_state_attributes() (#47759) 2021-03-11 21:23:20 +01:00
springstan
038c05d0ee
Return attribute dict directly without temporary variable (#41206) 2020-10-05 12:51:48 +02:00
Paulus Schoutsen
f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Colin Frei
b3f429eefa Swiss Transport Data: Save delay on sensor (#30526) 2020-01-07 12:27:34 +01:00