Commit graph

121 commits

Author SHA1 Message Date
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
Penny Wood
646c4a7137
Bootstrap to start registry loading early ()
* Registries store directly in data on loading.

* Loading registries concurent with stage 1.

* Removed comments
2019-03-27 22:06:20 +08:00
Paulus Schoutsen
4f5446ff02
Add area permission check () 2019-03-11 11:02:37 -07:00
Paulus Schoutsen
8213016eaf
Allow targeting areas in service calls ()
* Allow targeting areas in service calls

* Lint + Type

* Address comments
2019-03-04 09:51:12 -08:00
David F. Mulcahey
c4400be62a Add friendly name to devices in the device registry ()
* add friendly name to devices in the device registry

* switch to name_by_user

* review comments
2019-02-26 12:20:16 -08:00
Robert Svensson
bd335e1ac1 Area registry ()
* First draft of area registry

* Refactor based on input

* Add tests for areas
Add tests for updating device

* Updating a device shouldn't require area

* Fix Martins comment

* Require admin

* Save after deleting

* Rename read to list_areas
Fix device entry_dict
Remove area id from device when deleting area

* Fix tests
2019-01-28 15:52:42 -08:00
Steven Looman
501b3f9927 Disable creating port mappings from UI, add discovery from component ()
* Disable creating port mappings from UI, add discovery from component

* Remove unused constant

* Upgrade to async_upnp_client==0.13.6 and use manufacturer from device

* Upgrade to async_upnp_client==0.13.7
2018-12-21 17:25:23 +00:00
Paulus Schoutsen
43ae57cc59 Lint 2018-11-06 19:27:52 +01:00
Paulus Schoutsen
bde02afe4f Normalize MAC addresses ()
* Normalize MAC addresses

* Handle all mac formats
2018-11-06 16:33:31 +01:00
Paulus Schoutsen
b5284aa445 Fix device reg considered changed ()
* Fix device reg considered changed

* Better syntax
2018-10-25 16:43:11 +02:00
Paulus Schoutsen
da3342f1aa
Update new values coming in for dev registry ()
* Update new values coming in for dev registry

* fix Lint+Test;2C
2018-09-27 11:26:58 +02:00
Paulus Schoutsen
b8257866f5
Clean up device update, add via-hub ()
* Clean up device update, add via-hub

* Test loading/saving data

* Lint

* Add to Hue"

* Lint + tests
2018-09-17 13:39:30 +02:00
Robert Svensson
7a6facc875 Device and entity registry remove config entry on unload ()
* Test

* Ability to remove device

* Don't remove devices, instead remove config entry from device and entity registries

* Remove print

* Remove is not the same as unload

* Add tests

* Fix hound comment
2018-09-04 09:00:14 +02:00
Robert Svensson
8ab31fe139 Store devices as dict instead of list ()
* Store devices as dict instead of list

* Use OrderedDict
2018-08-28 00:37:04 +02:00
Robert Svensson
97173f495c Device registry store config entry ()
* Allow device registry to optionally store config entries

* Connections and identifiers are now sets with tupels

* Make config entries mandatory

* Fix duplicate keys in test

* Rename device to device_info

* Entity platform should only create device entries if config_entry_id exists

* Fix Soundtouch tests

* Revert soundtouch to use self.device

* Fix baloobs comments

* Correct type in test
2018-08-25 10:59:28 +02:00
Robert Svensson
e91a1529e4
deCONZ - Support device registry ()
Add support for device registry in deCONZ component
2018-08-24 19:37:22 +02:00
Ville Skyttä
dd9d53c83e Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 ()
* Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0

* Pydocstyle D401 fixes
2018-08-24 10:28:43 +02:00
Robert Svensson
0009be595c Device Registry ()
* First draft

* Generate device id

* No obscure registry

* Dont store config_entry_id in device

* Storage

* Small mistake on rebase

* Do storage more like entity registry

* Improve device identification

* Add tests

* Remove deconz device support from PR

* Fix hound comments, voff!

* Fix comments and clean up

* Fix proper indentation

* Fix pydoc issues

* Fix mochad component to not use self.device

* Fix mochad light platform to not use self.device

* Fix TankUtilitySensor to not use self.device

* Fix Soundtouch to not use self.device

* Fix Plex to not use self.device

* Fix Emby to not use self.device

* Fix Heatmiser to not use self.device

* Fix Wemo lights to not use self.device

* Fix Lifx to not use self.device

* Fix Radiotherm to not use self.device

* Fix Juicenet to not use self.device

* Fix Qwikswitch to not use self.device

* Fix Xiaomi miio to not use self.device

* Fix Nest to not use self.device

* Fix Tellduslive to not use self.device

* Fix Knx to not use self.device

* Clean up a small mistake in soundtouch

* Fix comment from Ballob

* Fix bad indentation

* Fix indentatin

* Lint

* Remove unused variable

* Lint
2018-08-22 10:46:37 +02:00