Commit Graph

22 Commits (0458bd68d9aad50f5e21700eeb1ce4cb3cfaa511)

Author SHA1 Message Date
Kevin Stillhammer 066db11620
Exchange WazeRouteCalculator with pywaze in waze_travel_time (#98169)
* exchange WazeRouteCalculator with pywaze

* directly use async is_valid_config_entry

* store pywaze client as property

* fix tests

* Remove obsolete error logs

* Reuse existing httpx client

* Remove redundant typing

* Do not clcose common httpx client
2023-08-14 10:02:30 +02:00
Franck Nijhof c3936e6f14
Replace isort with ruff (#94302) 2023-06-08 23:43:56 +02:00
Kevin Stillhammer 609a7ccda8
Use Selectors for waze_travel_time flows (#91778)
* Use Selectors for waze_travel_time flows

* Use correct selector option in tests

* Remove duplicate option

* Use suggested values
2023-04-21 12:57:45 +02:00
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 278050a73f
Add type hints to integration tests (t-z) (#87707) 2023-02-08 19:10:53 +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 77585686e0
Allow empty string for filters for waze_travel_time (#80953)
* Allow empty string for filters

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

* Apply PR feedback

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

Signed-off-by: Kevin Stillhammer <kevin.stillhammer@gmail.com>
2022-10-28 21:01:53 -04:00
Kevin Stillhammer c70614fd7c
Move default options to config_flow for waze_travel_time (#80681)
Move default options to config_flow

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

Signed-off-by: Kevin Stillhammer <kevin.stillhammer@gmail.com>
2022-10-21 08:02:41 -07:00
Kevin Stillhammer 8dd2d6f825
Remove deprecated yaml import for waze_travel_time (#80669)
Remove deprecated yaml import

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

Signed-off-by: Kevin Stillhammer <kevin.stillhammer@gmail.com>
2022-10-20 08:17:21 -07:00
Kevin Stillhammer d01f85b6aa
Remove old import logic for waze_travel_time (#80079)
Remove old import logic
2022-10-11 12:05:53 +03:00
Kevin Stillhammer 31ddf6cc31
Log config_flow errors for waze_travel_time (#79352) 2022-10-01 08:56:47 -07:00
epenet 9490771a87
Refactor distance, speed and volume utils (#77952)
* Refactor distance util

* Fix bmw connected drive tests

* Adjust here travel time tests

* Adjust waze travel time tests

* Adjust test_distance

* Adjust rounding values

* Adjust more tests

* Adjust volume conversions

* Add tests
2022-09-07 16:18:00 +02:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Kevin Stillhammer 93fab1f996
Cleanup Waze_travel_time_sensor_tests (#67047) 2022-02-23 09:59:42 -08:00
Kevin Stillhammer dbb8806b31
Use length_util conversion (#67049) 2022-02-22 19:06:23 +02:00
Kevin Stillhammer 6ec0e3811a
Waze travel time sensor tests (#66558) 2022-02-21 23:15:35 -08:00
Robert Hillis cfb47b9195
Remove deprecated yaml config from waze_travel_time (#62543) 2022-01-04 13:39:32 +01:00
Paulus Schoutsen b0f24b65d6
Drop more persistent notification patches (#57295) 2021-10-08 16:45:05 +02:00
Shay Levy 02d8d25d1d
Fix Waze Travel Time tests (#52663) 2021-07-07 23:56:02 +03: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 6f36fcc427
Improve Waze Travel Time import and naming logic (#49838) 2021-04-29 15:49:16 +02:00
Raman Gupta 5305d083ec
Add config flow for Waze Travel Time (#43419)
* Add config flow for Waze Travel Time

* update translations

* setup entry is async

* fix update logic during setup

* support old config method in the interim

* fix requirements

* fix requirements

* add abort string

* changes based on @bdraco review

* fix tests

* add device identifier

* Update homeassistant/components/waze_travel_time/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* fix tests

* Update homeassistant/components/waze_travel_time/sensor.py

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

* log warning for deprecation message

* PR feedback

* fix tests and bugs

* re-add name to config schema to avoid breaking change

* handle if we get name from config in entry title

* fix name logic

* always set up options with defaults

* Update homeassistant/components/waze_travel_time/sensor.py

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

* Update config_flow.py

* Update sensor.py

* handle options updates by getting options on every update

* patch library instead of sensor

* fixes and make sure first update writes the state

* validate config entry data during config flow and entry setup

* fix input parameters

* fix tests

* invert if statement

* remove unnecessary else

* exclude helpers from coverage

* remove async_setup because it's no longer needed

* fix patch statements

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-05 19:25:52 -04:00