Erik Montnemery
614f3c6a15
Move device info validation to device registry ( #96465 )
...
* Move device info validation to device registry
* Don't move DeviceInfo
* Fix type annotation
* Don't block adding device for unknown config entry
* Fix test
* Remove use of locals()
* Improve error message
2023-07-14 08:55:17 -04: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
Paulus Schoutsen
eee8566694
Differentiate between device info types ( #95641 )
...
* Differentiate between device info types
* Update allowed fields
* Update homeassistant/helpers/entity_platform.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Split up message in 2 lines
* Use dict for device info types
* Extract device info function and test error checking
* Simplify parsing device info
* move checks around
* Simplify more
* Move error checking around
* Fix order
* fallback config entry title to domain
* Remove fallback for name to config entry domain
* Ensure mocked configuration URLs are strings
* one more test case
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-10 09:56:06 -04: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
Paulus Schoutsen
9280dc69ae
Default device name to config entry title ( #95547 )
...
* Default device name to config entry title
* Only apply name default if device info provided
* Fix logic detecting type of device info
2023-06-30 13:54:20 -04:00
Erik Montnemery
071d3a474f
Base entity ids on English for languages not using Latin script ( #91357 )
2023-06-27 14:37:50 +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
083cf7a38b
Fix refactoring error with updating polling entities in sequence ( #93693 )
...
* Fix refactoring error with updating in sequence
see #93649
* coverage
* make sure entities are being updated in parallel
* make sure entities are being updated in sequence
2023-05-28 16:20:48 +02:00
J. Nick Koston
3a1389c3b4
Switch some frequently called call_laters to call_at ( #93659 )
...
* Switch some frequently called call_laters to call_at
call_at is a bit faster than call_later since call_later
is a wrapper around call_at.
We call at lot of these at startup so it helps a bit when
we are resource constrained
* update test
* update test
2023-05-27 19:45:35 -04:00
epenet
ab6e929443
Fix EntityComponent lingering timer in helper tests ( #89801 )
...
* Fix lingering timer in entity platform tests
* Tweak
* Fix entity and entity_component also
* Remove async_shutdown
* Adjust
* Adjust
2023-03-17 10:26:05 +01:00
epenet
46a5aa71ec
Add type hints to helper tests ( #89784 )
2023-03-16 11:10:56 +01:00
epenet
6febe00516
Fix lingering task in entity_platform test ( #88957 )
...
* Fix lingering task in entity_platform test
* Speed up the test
2023-03-01 10:49:13 +01:00
epenet
5f25b71df7
Add type hints to core tests ( #88478 )
2023-02-20 11:42:56 +01:00
Franck Nijhof
1e05697080
Enable Ruff B007 ( #88356 )
...
* Enable Ruff B007
* Adjust existing cases
2023-02-17 21:08:18 -05: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
Franck Nijhof
80bf632e2d
Clean up unnecessary registry mocks from helpers ( #87734 )
2023-02-08 20:15:29 -05:00
epenet
c98b4e3204
Add typing to tests with single hass argument (2) ( #87675 )
...
* Add typing to tests with single hass argument (2)
* a few more
2023-02-08 08:51:43 +01:00
Erik Montnemery
8e617bbc1d
Add `translation_key` property to entites ( #82701 )
...
* Add translation_key attribute to entity state
* Update accuweather test
* Index entity translation keys by platform
* Store translation key in entity registry
2022-12-01 09:34:09 +01:00
Erik Montnemery
e332091d76
Improve unique_id collision checks in entity_platform ( #78132 )
2022-09-09 14:35:23 +02:00
Erik Montnemery
2e228b2608
Tweak handling of entities with `has_entity_name` set ( #74948 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-07-11 15:10:53 -07:00
Erik Montnemery
26a85c6644
Add Entity.has_entity_name attribute ( #73217 )
2022-06-28 09:38:05 -07:00
Paulus Schoutsen
3b88c6c012
Inverse parallel updates default check, follow sync "update" method ( #71720 )
2022-05-16 17:10:34 -07:00
Franck Nijhof
7b75a16745
Add visible by default property to base Entity ( #70370 )
2022-04-21 22:06:34 -07:00
Paulus Schoutsen
130ca2213f
Enforce EntityCategory enum ( #69015 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-31 15:04:33 -07:00
J. Nick Koston
a75bbc79a2
Prevent polling from recreating an entity after removal ( #67750 )
2022-03-07 20:42:16 -08:00
J. Nick Koston
a40549c1b9
Fix hw_version not updating from an entity device_info ( #62254 )
2021-12-18 21:53:49 -08:00
Ville Skyttä
5bf67cac66
Use RegistryEntryDisabler ( #60436 )
2021-12-15 23:25:40 +02:00
Joakim Plate
c54ca7941f
Make sure entity inherit disabled device ( #60469 )
2021-12-01 13:59:57 -08:00
Erik Montnemery
c0d2a66609
Add stable ID to entity registry entries ( #60218 )
...
* Add UUID to entity registry entries
* Fix test
2021-11-24 09:01:35 +01:00
Ville Skyttä
39691faccc
Use DeviceEntryType in non-typechecked code too ( #58646 )
2021-11-23 10:04:33 +01:00
Erik Montnemery
49a27e12ad
Add support to entity registry for overriding device_class ( #59985 )
2021-11-22 08:38:06 -08:00
Erik Montnemery
0df2904b89
Improve some entity registry tests ( #59902 )
2021-11-22 10:24:37 +01:00
Jesse Hills
ea028e38d5
Allow configuration_url to be removed/nullified from device registry ( #58564 )
...
* Allow configuration_url to be removed from device registry
* Add test
* Check for None before stringifying and url parsing
* Add type to dict to remove mypy error on assigning None
2021-10-28 12:11:54 +02:00
Joakim Sørensen
d16304a201
Allow homeassistant prefix for device info configuration url ( #58414 )
...
* Allow panel prefix for device info configuration url
* Add to add-ons
* Use homeassistant as the prefix
* Update homeassistant/components/hassio/__init__.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-10-26 10:34:02 +02:00
Erik Montnemery
e27e4c3561
Add support for device configuration URL ( #57539 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-10-14 11:16:56 -07:00
Paulus Schoutsen
ee2c950716
Merge system options into pref properties ( #51347 )
...
* Make system options future proof
* Update tests
* Add types
2021-06-01 22:34:31 +02:00
Paulus Schoutsen
4821484d2c
Add system option to disable polling ( #51299 )
2021-05-31 15:36:40 -07:00
Franck Nijhof
c5383219f1
Remove stale debug statements from tests ( #51059 )
2021-05-25 11:52:20 +02:00
Ville Skyttä
77d5244577
Use device registry CONNECTION_* constants ( #49923 )
2021-04-30 23:58:50 +02:00
Ville Skyttä
a396619251
Use disabled_by constants ( #49584 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-23 09:56:42 +02:00
J. Nick Koston
44beff31c2
Cancel config entry retry, platform retry, and polling at the stop event ( #49138 )
2021-04-13 16:16:26 -10:00
J. Nick Koston
b5c679f3d0
Apply ConfigEntryNotReady improvements to PlatformNotReady ( #48665 )
...
* Apply ConfigEntryNotReady improvements to PlatformNotReady
- Limit log spam #47201
- Log exception reason #48449
- Prevent startup blockage #48660
* coverage
2021-04-04 12:31:58 +02:00
Erik Montnemery
b3fecb1c95
Update tests t-z to use async_get() instead of async_get_registry() ( #47655 )
2021-03-09 14:25:03 +01:00
J. Nick Koston
bb7e4d7daa
Implement suggested_area in the device registry ( #45940 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-19 19:34:33 -10:00
Ville Skyttä
2fb3be50ab
Make DeviceRegistry.async_get_device connections arg optional ( #44897 )
...
* Make async_get_device connections Optional, default None
* Remove unnecessary async_get_device connections arg usages
Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
J. Nick Koston
df2ede6522
Fix state overwrite race condition where two platforms request the same entity_id ( #42151 )
...
* Fix state overwrite race condition where two platforms request the same entity id
* fix test
* create reservations instead
* revert
* cannot use __slots__ because we patch async_all
2020-10-21 17:01:51 +02:00
springstan
d2b1918e9c
Drop UNIT_ prefix for percentage constant ( #39383 )
2020-09-05 21:09:14 +02:00
Paulus Schoutsen
b3571602bb
Add default_* to device registry ( #38829 )
2020-08-13 10:38:56 +02:00
Pascal Vizeli
72a6251042
V2 timeout for async_add_entities ( #38601 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-07 08:36:38 +02:00