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
This commit is contained in:
Cyrill Raccaud
2023-12-21 20:38:00 +01:00
committed by GitHub
parent 54f460b7c9
commit 7e685f2bc7
14 changed files with 501 additions and 34 deletions
+1
View File
@@ -475,6 +475,7 @@ FLOWS = {
"sun",
"sunweg",
"surepetcare",
"swiss_public_transport",
"switchbee",
"switchbot",
"switchbot_cloud",
+1 -1
View File
@@ -5613,7 +5613,7 @@
"swiss_public_transport": {
"name": "Swiss public transport",
"integration_type": "hub",
"config_flow": false,
"config_flow": true,
"iot_class": "cloud_polling"
},
"swisscom": {