Commit Graph

1043 Commits (837ee7c4fb87049fc1993f4f809a26312adabbe1)

Author SHA1 Message Date
Marc Mueller bc2ee96cae
Remove quotes surrounding annotations (#117817) 2024-05-20 22:06:58 +02:00
Sid 2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Jan Bouwhuis 986df70fe3
Refactor group setup (#116317)
* Refactor group setup

* Add @callback decorator and remove commented out code

* Keep set, add default on state
2024-04-28 16:32:17 +02:00
J. Nick Koston ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately (#115169) 2024-04-08 10:07:54 -10:00
Marc Mueller 289700dcf5
Improve generic event typing [device_tracker] (#114730) 2024-04-06 14:01:05 +02:00
Sid 0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Marc Mueller 816ce116bf
Remove unnecessary functools.cached_property backport (#114239) 2024-04-04 11:24:26 +02:00
J. Nick Koston 742643936f
Migrate legacy device_tracker task creation to use eager_start (#114703)
Many of these can finish synchronously without being scheduled on the loop
2024-04-03 12:12:52 +02:00
Phil Bruckner ea2bb24484
Remove old device tracker device cleanup code & test (#114668) 2024-04-02 15:23:59 -05:00
Marc Mueller 911a31f860
Use SignalType to improve typing [core] (#114298) 2024-03-27 14:25:02 +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 39c44ad5b7
Move setup of legacy device_tracker see service to legacy setup task (#114043)
* Move setup of legacy device_tracker see service to legacy setup task

device_tracker can setup synchronously now if there are no legacy
platforms that have to be import to validate the config

The see service is not useful until at least one legacy platform
is loaded so there is no reason to wait for it in the base
setup.

* collapse
2024-03-23 09:40:34 +01:00
J. Nick Koston 7b67a486bd
Migrate legacy device_tracker shutdown to use run_immediately (#113835)
A call_soon is not needed here
2024-03-19 14:07:57 -10:00
J. Nick Koston c615b52840
Refactor integration startup time to show wall clock time (#113707)
* Refactor setup time tracking to exclude time waiting on other operations

We now exclude the import time and th time waiting on
base platforms to setup from the setup times

* tweak

* tweak

* tweak

* tweak

* adjust

* fixes

* fixes

* preen

* preen

* tweak

* tweak

* adjust

* tweak

* reduce

* do not count integrtion platforms against their parent integration

* handle legacy tts platforms

* stt as well

* one more wait

* use the same pattern in all the legacy

* fix tts and stt legacy

* fix

* fix

* reduce

* preen

* entity comp does not wait for platforms

* scene blocks as well

* fix test

* test fixes

* coverage

* coverage

* coverage

* fix test

* Update tests/test_setup.py

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

* Update tests/test_setup.py

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

* Update homeassistant/setup.py

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

* strip

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* remove complexity

* Apply suggestions from code review

* no longer works that way

* fixes

* fixes

* fixes

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-18 21:45:34 -04: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
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Jan-Philipp Benecke c58bba55bf
Remove deprecated `hass.components` from legacy device tracker platform (#113612) 2024-03-16 11:19:29 -10:00
J. Nick Koston b26928878f
Remove group integration platforms that use the default states (#113562)
Remove group integration platforms that use the default

There is no need to register platforms that use the defaults
as the group code already uses STATE_ON/STATE_OFF when there
are no on/off states in the GroupIntegrationRegistry
2024-03-15 20:51:21 -04:00
J. Nick Koston c3b5e819c5
Fix group loading too late resulting in incorrect state (#113262) 2024-03-13 19:18:15 -10:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 0e3945ca6c
Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
J. Nick Koston 40774101d3
Avoid creating task per device when adding legacy device trackers (#111220) 2024-02-23 23:47:43 +01:00
Paul Bottein 30dec53b07
Add device tracker icon translations (#109109) 2024-01-30 12:32:02 +01: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
Erik Montnemery 95f7db1970
Move config_per_platform and extract_domain_configs to config.py (#104989) 2023-12-04 12:48:49 +01:00
Jan Bouwhuis 9962301b42
Do not notify config errors during logging (#104466) 2023-11-24 21:34:09 +01:00
Erik Montnemery 5b37096b5f
Refactor config.async_log_exception (#104034)
* Refactor config.async_log_exception

* Improve test coverage

* Make functions public
2023-11-15 19:09:49 +01:00
Martin Hjelmare bb456464ae
Fix device tracker see gps accuracy selector (#104022) 2023-11-15 10:51:12 +01:00
Jan Bouwhuis a5f8774878
Use cached_property for legacy device_tracker type (#101125) 2023-09-29 20:54:24 +02:00
J. Nick Koston a04c61e77b
Replace lambda with attrgetter in device_tracker device_trigger (#99663) 2023-09-05 16:41:35 +02:00
Erik Montnemery 045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Meow 024d646526
Aligned integration manifest files (#97175) 2023-07-25 08:33:56 +02:00
Franck Nijhof 30058297cf
Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
J. Nick Koston 28ff173f16
Only lookup hostname/ip_address/mac_address once in device_tracker (#96984) 2023-07-21 00:07:06 -05:00
Erik Montnemery 7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Franck Nijhof 7468320860
Migrate device_tracker services to support translations (#96320)
* Migrate device_tracker services to support translations

* Tweaks

* Apply suggestions from code review

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:19:29 +02:00
Erik Montnemery 86a397720f
Move platform_integration_no_support issue to the homeassistant integration (#95927)
* Move platform_integration_no_support issue to the homeassistant integration

* Update test

* Improve repair text

* Update test
2023-07-07 13:31:54 +02:00
gigatexel c75c79962a
Clarify GPS coordinates for device_tracker.see (#95847) 2023-07-05 14:31:27 +02:00
Martin Hjelmare 081e4e03a7
Disable legacy device tracker no platform log (#95839) 2023-07-04 13:26:48 +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 59f5b8f2d6
Remove unneeded checks for Entity.platform (#94321)
* Remove unneeded checks for Entity.platform

* Update tests

* Prevent breaking integrations without an EntityComponent

* Warn when entity has no platform
2023-06-09 15:17:41 +02:00
G Johansson c6feb30c31
Raise issue "does not support platform setup" (#93585)
* Raise issue on platform missing

* Modify issue

* Remove deprecation

* Fix strings

* Strings

* Last strings

* strings to common
2023-05-28 21:53:32 +02:00
J. Nick Koston 67d9fa8b22
Disable call_soon for device tracker device registry updates (#93638)
Run device tracker device registry updates immediately
without the call_soon delay. This listener does not
need a delay and it only adds overhead in this case.
2023-05-27 19:58:27 -04:00
epenet 4a0988eb5d
Adjust shutdown registration in EntityComponent (#90938)
* Adjust shutdown registration in EntityComponent

* Adjust

* Make it more explicit

* docstring
2023-04-13 08:47:04 +02:00