Commit Graph

293 Commits (092cdcfe91611a368eb305dd2b64fc5101cdbeaa)

Author SHA1 Message Date
epenet 7e62061b9a
Improve typing for `calls` fixture in tests (a-l) (#118349)
* Improve typing for `calls` fixture in tests (a-l)

* More

* More
2024-05-29 09:06:48 +02:00
Sid 3efee10b95
Enable Ruff RUF013 (#115333) 2024-04-10 08:55:59 +02:00
epenet 0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
J. Nick Koston e86fec310b
Improve performance of extracting entities by label (#114720) 2024-04-03 10:24:44 -10:00
Phil Bruckner ea2bb24484
Remove old device tracker device cleanup code & test (#114668) 2024-04-02 15:23:59 -05:00
Sid d5f883fbf0
Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
Jan-Philipp Benecke 530552b4f5
Use `mock_platform` for device_tracker entity component tests instead of `hass.components` (#114398)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-28 15:23:21 -10:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
J. Nick Koston 6371b344b9
Ensure discovery can setup legacy device tracker platforms (#114101) 2024-03-24 07:38:05 -10:00
J. Nick Koston d4b180cf75
Fix flapping device_tracker test_bad_platform test (#114102)
https://github.com/home-assistant/core/actions/runs/8408079861/job/23023835074
2024-03-24 13:23:12 +01:00
J. Nick Koston e8cb6a8e29
Optimize loading of translations (#114089) 2024-03-23 22:22:09 -10:00
J. Nick Koston ac175a4240
Fix flakey test_reading_yaml_config test (#113902) 2024-03-20 10:39:31 -10:00
J. Nick Koston fff590d738
Fix flapping device tracker test (#113859)
seen in https://github.com/home-assistant/core/actions/runs/8353028595/job/22864148890?pr=113854
2024-03-20 07:21:26 +01:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
J. Nick Koston 8a144d16f5
Move legacy device_tracker setup to a tracked task (#113715)
* Move legacy device_tracker setup to a tracked task

Legacy platforms are now loaded in a tracked task which
allows anything waiting on device_tracker (such as
a config entry that uses the device_tracker
platform) to proceed.

This also allows us to remove the workaround
of adding device_tracker to
hass.config.components in its setup

* tweak

* tweak

* fix tests
2024-03-18 10:39:59 +01:00
J. Nick Koston aaac879c83
Fix calling sync api in counter/ffmpeg/device_tracker tests (#113441) 2024-03-14 19:34:44 +01:00
J. Nick Koston c1f5c7c4b7
Remove usage of async_add_job in tests (#113259) 2024-03-13 19:33:33 -10:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Martin Hjelmare 53b73bd0bd
Make device tracker latitude and longitude optional (#108838)
* Make device tracker latitude and longitude optional

* Update test
2024-01-25 13:25:17 +01:00
Martin Hjelmare 852e4c21c6
Complete device tracker entity tests (#108768) 2024-01-24 19:50:55 +01:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
Robert Resch 9dd1b9e268
Deprecate deprecated device tracker constants (#106099) 2023-12-20 18:06:38 +01:00
Jan-Philipp Benecke dc17780e5b
Remove device from known_devices upon import in ping device tracker (#105009)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-05 18:52:22 +01:00
Erik Montnemery 84e74e4c74
Reverse component path (#104087)
* Reverse component path

* Update translations helper

* Fix

* Revert incorrect change of PLATFORM_FORMAT

* Fix use of PLATFORM_FORMAT in tts

* Fix ios
2023-12-05 08:43:58 +01:00
Jan-Philipp Benecke 81450f0117
Update d-e* tests to use entity & device registry fixtures (#103804) 2023-11-12 10:38:32 +01:00
Erik Montnemery 9cf9b36637
Use real devices in device_tracker device condition tests (#102707) 2023-10-24 23:31:49 +02:00
Erik Montnemery 6d1d3f4207
Use real devices in device_tracker device trigger tests (#102685) 2023-10-24 21:58:22 +02:00
Erik Montnemery ec143b26d7
Adjust device_tracker tests which create devices (#98188) 2023-08-10 18:22:33 +02:00
Erik Montnemery 16ec9b1e9f
Use entity registry id in device_tracker device conditions (#95254) 2023-06-26 20:29:39 +02:00
Erik Montnemery 20be441c9f
Teach device_tracker device trigger about entity registry ids (#94972) 2023-06-21 14:51:00 +02:00
Erik Montnemery 6a29ed8caa
Replace assert_lists_same with pytest_unordered in integrations a-f (#94900) 2023-06-20 20:22:31 +02:00
Jan Bouwhuis ec98e22330
Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Erik Montnemery 3cca338c6e
Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
Erik Montnemery 0126cfa9d9
Allow exposing any entity to the default conversation agent (#92398)
* Allow exposing any entity to the default conversation agent

* Tweak

* Fix race, update tests

* Update tests
2023-05-03 09:45:54 -04:00
J. Nick Koston 5f0d983df1
Make the device_tracker more forgiving when passed an empty ip address string (#91101)
This has come up over and over and over again

fixes #87165 fixes #51980
2023-04-08 22:32:56 -04: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 728f62b1ec
Add type hints to integration tests (part 5) (#87850) 2023-02-12 19:39:48 +01:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof 330e1c6cbb
Clean up unnecessary registry mocks from integration tests (#87763) 2023-02-09 10:43:45 +01:00
Franck Nijhof 51a9f65a01
Clean up unnecessary registry mocks from Core tests (#87726) 2023-02-08 13:28:44 -06:00
epenet 3052de3e8e
Add type hints to integration tests (d-e) (#87699) 2023-02-08 13:01:44 +01:00
epenet 4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
Franck Nijhof 24fdd588fd
Code styling tweaks to the tests - Part 1 (#86192) 2023-01-20 13:52:46 +01:00
epenet 4f31f28e67
Cleanup SourceType in tests (#78809) 2022-09-20 10:50:07 -04:00
epenet 14e5001d0c
Cleanup known_devices.yaml in device_tracker tests (#74404) 2022-07-04 14:10:25 +02:00
Shay Levy d56a487169
Fix CI failure due to integrations leaving dirty known_devices.yaml (#74329) 2022-07-02 11:20:40 -07:00
Erik Montnemery 5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary (#70335)
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Erik Montnemery 150f173eed
Mark device conditions from hidden or auxiliary entities as secondary (#70333) 2022-04-20 21:41:59 +02:00
Michael 70a771b6ed
Respect disable_new_entities for new device_tracker entities (#68148) 2022-03-21 20:40:33 -07:00