Commit Graph

20 Commits (c51e644203a0c93a791bc0d342d14a56728078fc)

Author SHA1 Message Date
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Cyrill Raccaud e512ad7a81
Fix missing duration translation for Swiss public transport integration (#136982) 2025-01-31 12:10:44 +01:00
Cyrill Raccaud bb8d4ca255
Add unit test for sensors in swiss public transport (#134115)
* add unit test for sensors

* clean up
2024-12-27 21:21:45 +01:00
Cyrill Raccaud 402340955e
Fix swiss public transport line field none (#133964)
* fix #133116

The line can theoretically be none, when no line info is available (lets say walking sections first?)

* fix line field

* add unit test with missing line field
2024-12-27 00:24:47 +01:00
Cyrill Raccaud 284fe17b1c
Add time and offset config to Swiss public transport connections (#120357)
* add time and offset config for connections

* split the config flow

* fix arrival config

* add time_mode data description

* use delta as dict instead of string

* simplify the config_flow

* improve descriptions of config_flow

* improve config flow

* remove obsolete string

* switch priority of the config options

* improvements
2024-11-27 13:22:28 +01:00
Cyrill Raccaud 62773fa88a
Simplify Swiss public transport coordinator (#128891) 2024-10-21 14:15:18 +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 5cb9901134
Cleaner unit tests for Swiss public transport (#123660)
cleaner unit tests
2024-08-12 16:19:36 +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
Marc Mueller f11b316dac
Import Generator from collections.abc (4) (#120917) 2024-07-01 11:54:42 +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
Marc Mueller 837ee7c4fb
Import Generator from typing_extensions (4) (#118992) 2024-06-06 17:41:37 +02:00
Joost Lekkerkerker f3ba713289
Use FlowResultType enum in config flow tests N-Z (#114682)
Use FlowResultType enum in config flow tests
2024-04-03 09:53:20 +02:00
Joost Lekkerkerker ee66f6ec8c
Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -10:00
Marc Mueller 7d6251ca08
Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +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 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