J. Nick Koston
a40549c1b9
Fix hw_version not updating from an entity device_info ( #62254 )
2021-12-18 21:53:49 -08:00
Marvin Wichmann
707fe67c00
Move StrEnum to homeassistant.backports and move Platform to homeassistant.const ( #60880 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-12-03 09:31:17 +01:00
Franck Nijhof
c8b0a3b667
Revert "Move Platform StrEnum to const" ( #60875 )
2021-12-02 14:19:08 -08:00
Franck Nijhof
6e220d5d17
Move Platform StrEnum to const ( #60857 )
2021-12-02 22:30:52 +01:00
Franck Nijhof
7d3fcfbd30
Add Platform StrEnum to entity_platform ( #60818 )
2021-12-02 09:07:09 -08:00
Ville Skyttä
4107063a5a
Make entity registry disabled_by an enum ( #60424 )
2021-12-02 18:02:29 +01:00
Joakim Plate
c54ca7941f
Make sure entity inherit disabled device ( #60469 )
2021-12-01 13:59:57 -08:00
Erik Montnemery
49a27e12ad
Add support to entity registry for overriding device_class ( #59985 )
2021-11-22 08:38:06 -08:00
Erik Montnemery
1609c0cc2c
Sort some entity_registry code ( #59876 )
...
* Sort some entity_registry code
* Sort some more entity_registry code
* Tweak
2021-11-18 11:51:32 +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
Marc Mueller
238b488642
Use assignment expressions 03 ( #57710 )
2021-10-17 20:08:11 +02:00
Paulus Schoutsen
7546c766dd
Fix lint issue ( #57694 )
2021-10-14 12:03:39 -07: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
Robert Hillis
488a636aec
Clean up unused loggers ( #57662 )
2021-10-14 10:03:38 -07:00
Erik Montnemery
4b3d423767
Add config and diagnostic entities ( #57528 )
...
* Add config entity concept
* Rename is_config_entity to entity_category
* Add test
* Add 'diagnostic' entity category
2021-10-14 10:04:26 +02:00
Erik Montnemery
bdbedd0f06
Alphabetize parts of device registry code ( #57532 )
2021-10-12 12:08:59 +02:00
Marc Mueller
77ee72cbb9
Import Callable from collections.abc (1) ( #56775 )
2021-09-29 16:32:11 +02:00
Marc Mueller
5d2e5d2612
Import Protocol from typing ( #52848 )
2021-07-12 10:35:17 +02:00
Shay Levy
ab73ce00a0
Change "Not adding entity" log level to debug ( #52240 )
2021-06-28 11:22:10 +02: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
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors ( #50884 )
2021-05-20 18:53:29 +03:00
Ruslan Sayfutdinov
0cb08f9516
Add missing type hints in entity_platform ( #50453 )
2021-05-12 16:28:44 +02:00
Franck Nijhof
efb1bb08a4
Add small async_get_current_platform helper method ( #50014 )
2021-05-03 16:46:42 +02:00
Franck Nijhof
378cee01b4
Add typing to async_register_entity_service ( #50015 )
2021-05-03 14:22:38 +02:00
Ruslan Sayfutdinov
0301706fc6
Define AddEntitiesCallback type ( #49812 )
2021-04-29 12:28:14 +02:00
J. Nick Koston
3fa8ffa731
Enable mccabe complexity checks in flake8 ( #49616 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
Marc Mueller
c07646db5d
Update typing syntax ( #49480 )
...
* Update typing syntax
* Replace typing imports with ones from collections where possible
* Changes after review
2021-04-20 17:40:41 +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
Raman Gupta
769923e8dd
Raise exception for invalid call to DeviceRegistry.async_get_or_create ( #49038 )
...
* Raise exception instead of returning None for DeviceRegistry.async_get_or_create
* fix entity_platform logic
2021-04-13 14:18:51 +02:00
J. Nick Koston
4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth ( #48962 )
2021-04-09 19:41:29 -10:00
J. Nick Koston
12e3bc8101
Provide api to see which integrations are being loaded ( #48274 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-04 22:11:44 -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
Franck Nijhof
38d14702fa
Remove HomeAssistantType alias from helpers ( #48400 )
2021-03-27 12:55:24 +01:00
J. Nick Koston
c4f98a3084
Small speed up to adding entities ( #48353 )
2021-03-26 12:05:19 +01:00
Marc Mueller
6fb2e63e49
Update typing 02 ( #48014 )
2021-03-17 18:34:19 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups ( #47248 )
...
* Unused pylint suppression cleanups
* Remove outdated pylint bug references
* Add flake8-noqa config and note to run it every now and then
* Add codes to noqa's
* Unused noqa cleanups
2021-03-02 09:02:04 +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
Franck Nijhof
9b7c39d20b
Postponed evaluation of annotations in core ( #46434 )
...
* Postponed evaluation of annotations in core
* Remove unneeded future
2021-02-12 10:58:20 +01:00
Paulus Schoutsen
9e07910ab0
Mark entities as unavailable when they are removed but are still registered ( #45528 )
...
* Mark entities as unavailable when they are removed but are still registered
* Add sync_entity_lifecycle to collection helper
* Remove debug print
* Lint
* Fix tests
* Fix tests
* Update zha
* Update zone
* Fix tests
* Update hyperion
* Update rfxtrx
* Fix tests
* Pass force_remove=True from integrations
Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Ville Skyttä
3a88a4120e
Helpers type hint improvements ( #44964 )
2021-01-09 00:08:34 +01:00
Philip Allgaier
392c058d34
Ensure consistent spelling of "ID" ( #44585 )
2020-12-28 18:34:08 +01:00
J. Nick Koston
3ec7258c21
Ensure instances of async_add_entities can be garbage collected ( #42919 )
2020-11-07 06:54:20 -10:00
J. Nick Koston
ce2c388c09
Ensure config entry platforms are excluded from reload ( #42367 )
2020-10-25 23:53:31 +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
Erik Montnemery
12a6d10168
Log exceptions in EntityPlatform.async_add_entities ( #41730 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-13 15:35:27 +02:00
Ville Skyttä
f28c3273c2
Upgrade mypy to 0.790 ( #41595 )
2020-10-12 19:17:30 -05:00
Ville Skyttä
167490b71c
Complete helpers.service type hints ( #40193 )
...
* Complete helpers.service type hints
* Update homeassistant/helpers/service.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Handle None entity.supported_features
2020-09-20 12:03:58 +03:00
J. Nick Koston
8adfcf23f0
Fix isy994 send_node_command ( #39806 )
2020-09-08 17:31:08 +02:00