1
0
mirror of https://github.com/home-assistant/core.git synced 2025-06-15 10:37:06 +00:00

62 Commits

Author SHA1 Message Date
Erik Montnemery
53263ea9bc
Revert "Add serial_number to device registry entries" () 2022-09-27 16:36:38 +02:00
Erik Montnemery
cba3b6ad94
Add serial_number to device registry entries () 2022-09-27 09:08:54 +02:00
Erik Montnemery
51c5f1d16a
Remove useless device_registry test () 2022-09-02 20:44:42 +00:00
Erik Montnemery
8924725d69
Improve some device registry tests () 2022-09-02 08:54:02 +02:00
J. Nick Koston
c2c6d12d73
Only fire device_registry_updated for suggested_area if the suggestion results in an area change () 2022-04-04 09:51:39 +02:00
Erik Montnemery
dcb3fc49c9
Include changes in EVENT_DEVICE_REGISTRY_UPDATED () 2022-02-16 12:29:08 +01:00
Stefan Agner
42706f780c
Convert disabled_by to DeviceEntryDisabler on load ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-01-11 20:50:32 -08:00
J. Nick Koston
04153c0075
Add hardware version to the device registry () 2021-12-16 05:16:19 -06:00
Ville Skyttä
7db3246de4
Make config entry disabled_by an enum ()
* Make config entry disabled_by an enum

* Update homeassistant/config_entries.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-15 20:53:21 +01:00
Paulus Schoutsen
a59ec9ca5e
Handle invalid device registry entry type ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-12-04 09:20:12 +01:00
Ville Skyttä
9f4de8df18
Make device entry disabled by an enum () 2021-11-24 22:32:16 +01:00
Erik Montnemery
24779dea3b
Bump device registry version to 1.2 () 2021-11-23 22:22:15 +01:00
Ville Skyttä
39691faccc
Use DeviceEntryType in non-typechecked code too () 2021-11-23 10:04:33 +01:00
Erik Montnemery
ca20fc857f
Remove via_device links when a device is removed ()
* Remove via_device links when a device is removed

* Update test
2021-11-23 09:36:03 +01:00
Ville Skyttä
053c456199
Change device entry type to an StrEnum ()
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-11-22 18:14:15 +01:00
Robert Svensson
c6213b36ad
Only disable a device if all associated config entries are disabled () 2021-07-29 12:08:53 -07:00
Ville Skyttä
77d5244577
Use device registry CONNECTION_* constants () 2021-04-30 23:58:50 +02:00
Ville Skyttä
a396619251
Use disabled_by constants ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-23 09:56:42 +02:00
Raman Gupta
769923e8dd
Raise exception for invalid call to DeviceRegistry.async_get_or_create ()
* Raise exception instead of returning None for DeviceRegistry.async_get_or_create

* fix entity_platform logic
2021-04-13 14:18:51 +02:00
Franck Nijhof
08870690a6
Fix a collection of tests with missing asserts ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-20 17:23:55 +01:00
Erik Montnemery
b3fecb1c95
Update tests t-z to use async_get() instead of async_get_registry() () 2021-03-09 14:25:03 +01:00
Erik Montnemery
5e26bda52d
Add support for disabling config entries () 2021-02-20 19:21:39 -08:00
J. Nick Koston
bb7e4d7daa
Implement suggested_area in the device registry ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-19 19:34:33 -10:00
Erik Montnemery
ed31cc363b
Wait for registries to load at startup ()
* Wait for registries to load at startup

* Don't decorate new functions with @bind_hass

* Fix typing errors in zwave_js

* Load registries in async_test_home_assistant

* Tweak

* Typo

* Tweak

* Explicitly silence mypy errors

* Fix tests

* Fix more tests

* Fix test

* Improve docstring

* Wait for registries to load
2021-02-11 17:36:19 +01:00
J. Nick Koston
a1662b3bb9
Restore the device id after deleting and re-adding an integration () 2021-01-27 17:10:57 +01:00
Ville Skyttä
2fb3be50ab
Make DeviceRegistry.async_get_device connections arg optional ()
* 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 () 2021-01-01 22:31:56 +01:00
Erik Montnemery
dc8364fd3a
Support disabling devices () 2020-11-26 16:45:02 +01:00
Erik Montnemery
8a7febcfbe
Improve restore of deleted devices ()
* Improve restore of deleted devices

* Simplify
2020-11-10 22:14:39 +01:00
Erik Montnemery
863b63d75e
Fix handling of device registry defaults () 2020-09-06 21:08:50 -05:00
Paulus Schoutsen
b3571602bb
Add default_* to device registry () 2020-08-13 10:38:56 +02:00
J. Nick Koston
6ea5c8aed9
Index the device registry () 2020-07-19 23:32:05 -07:00
Erik Montnemery
7722e417ad
Stable device id when a deleted device is restored ()
* Stable device id when a deleted device is restored.

* Tweak

* Store only basic data for deleted devices

* Simplify code

* Simplify code

* Address review comments.

* Improve test

* Fix missing save
2020-06-02 21:22:08 +02:00
Andre Lengwenus
919f3243de
Fix device_registry cleanup behavior ()
* Fix: Only decives which are not referenced by an entity or a config_entry are removed

* Adapted test for async_cleanup

* Changed variable names
2020-05-23 09:46:03 +02:00
Paulus Schoutsen
4ae31bc938
Clean up device registry if entity registry updates () 2020-05-05 10:53:46 -07:00
Paulus Schoutsen
b90cb09fd1
Add type to device registry () 2020-05-03 13:56:58 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ()
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
Martin Hjelmare
fbde040f59
Complete device registry update ()
* Add manufacturer and model parameters to device registry update
  method.
2020-04-21 19:40:16 +02:00
Alexei Chetroi
440c837eb6
Allow sw_version update of a device registry entry. () 2020-03-11 09:31:02 -07:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations () 2020-01-02 21:17:10 +02:00
Bas Nijholt
f60125b5c9 Sort imports according to PEP8 for 'tests' () 2019-12-09 16:52:24 +01:00
Bram Kragten
b75639d9d1 Remove lamps and groups from ha when removed from Hue ()
* Remove light when removed from hue

* add remove_config_entry_id

* Review + bump aiohue

* lint

* Add tests
2019-09-25 14:00:18 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Aaron Bach
a491f97eb9 Allow updating of via_device in device registry ()
* Allow updating of via_device in device registry

* Added test
2019-07-04 19:10:23 -04:00
Penny Wood
84e6813779 Rename via_hub to via_device ()
* Rename via_hub to via_device

* Fixed registry interactions
2019-06-10 09:10:44 -07:00
Penny Wood
f991ec15f2 Delete devices / entities when we remove a config entry. ()
* Remove device when last config entry removed

* Remove entities when config entry removed

* Update tests to use new behaviour
2019-05-19 11:41:39 +02:00
Paulus Schoutsen
07ee3b2eb9
Add update events to registries ()
* Add update events to registries

* Add to websocket
2019-05-07 20:04:57 -07:00
Andrew Sayre
cfaaae661a Add core APIs to migrate device identifiers and entity unique_id ()
* Add device identifiers migration

* Add entity unique_id migration

* Update per arch issue

* Move to existing update methods
2019-04-30 10:04:37 -07:00
Jason Hu
3d8673dbf8 Resolve auth_store loading race condition ()
* Add lock in auth_store._async_load()

* Python 3.5 does not like assert_called_once()
2019-03-08 14:50:24 -08:00