Commit Graph

19 Commits (aa50096a318ca8b90981ece63317bfdc839be714)

Author SHA1 Message Date
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 89e4ee5320
Add type hints to integration tests (part 8) (#87982) 2023-02-13 11:13:48 +01:00
epenet 7a4d15a657
Add type hints to integration tests (f-g) (#87700) 2023-02-08 13:33:52 +01:00
Franck Nijhof ef800335fb
Enable Ruff PT022 (#86792)
* Enable Ruff PT022

* Adjust found cases
2023-01-27 13:57:06 +01:00
Kevin Stillhammer b35cfe711a
Move default option handling to config_flow for google_travel_time (#80607)
Move default option handling to config_flow
2022-10-20 19:32:45 -07:00
epenet e84e5f134e
Use US_CUSTOMARY_SYSTEM in tests (#80658)
* Use US_CUSTOMARY_SYSTEM in tests

* Don't update test_unit_system
2022-10-20 15:42:23 +02:00
Kevin Stillhammer ef90fe9aee
Display and log google_travel_time errors (#77604)
* Display and log google_travel_time errors

* Rename is_valid_config_entry to validate_config_entry

Signed-off-by: Kevin Stillhammer <kevin.stillhammer@gmail.com>

Signed-off-by: Kevin Stillhammer <kevin.stillhammer@gmail.com>
2022-10-16 10:06:53 -07:00
epenet 0b7c84edbd
Adjust distance unit check in google travel time (#80232)
* Cleanup unused option in google travel time

* Adjust tests

* Adjust to use local constant

* Tweak logic

* Reduce size of PR

* Add tests

* Use system compare

* Use is not ==

* Adjust to use local constant again
2022-10-14 12:13:47 +02:00
Kevin Stillhammer edad6d0f26
Remove old import logic for google_travel_time (#80018)
Remove old import logic
2022-10-11 10:49:06 +03:00
epenet a809e18559
Apply hass-relative-import to tests (d-h) (#78730) 2022-09-19 09:31:57 +02:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Kevin Stillhammer 2cba9b3d7e
Cleanup_google_travel_time_tests (#66868) 2022-02-21 23:05:12 -08:00
Kevin Stillhammer beb30a1ff1
Add google_travel_time sensor tests (#66568)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-02-18 10:21:28 -08:00
Robert Hillis 101341f186
Remove deprecated yaml config from google travel time (#62468) 2021-12-21 11:00:11 +01:00
Paulus Schoutsen b0f24b65d6
Drop more persistent notification patches (#57295) 2021-10-08 16:45:05 +02:00
Raman Gupta 8edf7f0407
Don't enforce uniqueness requirements for Waze and Google Travel Time (#50254)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-26 08:32:26 -07:00
Raman Gupta 4a95f6c2a3
Improve Google Travel Time import and naming logic (#49839) 2021-04-29 17:10:03 +02:00
Raman Gupta caaa62a7f9
Clean up google travel time code (#48708) 2021-04-07 12:39:27 +02:00
Raman Gupta aae0ccc588
Add config flow support to google_travel_time (#43509)
* add config flow support to google_travel_time

* fix bugs and add strings

* fix import and add new test

* address comments in #43419 since this is a similar PR

* fix default name and test

* add unique ID and device info

* fix test

* feedback from waze PR

* continue incorporating feedback from waze PR

* final fixes and update tests

* call update in lambda

* Update homeassistant/components/google_travel_time/sensor.py

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

* additional fixes

* validate config entry data during config flow and config entry setup

* don't store entity

* patch dependency instead of HA code

* fixes

* improve tests by moving all patching to fixtures

* use self.hass instead of setting self._hass

* invert if

* remove unnecessary else

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-31 22:10:24 +02:00