Commit Graph

37 Commits (0e3945ca6c4c28c7c20901141f44ee83eb3a54c7)

Author SHA1 Message Date
J. Nick Koston 9d7c947d19
Migrate config to use async_get_component (#112160)
The component should always be loaded here but in the rare
case it might not be, we should not block the loop when it
loads
2024-03-04 06:10:44 -05:00
J. Nick Koston 50770ce436
Refactor config integration to use normal functions for setup (#110750)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-16 18:12:33 -06:00
J. Nick Koston 1608e05be6
Speed up registry config websocket api calls with list comps (#110693)
* Speed up registry config websocket api calls with list comps

list comps are faster than generator expressions, even more so in
python 3.12 since https://peps.python.org/pep-0709/

https://stackoverflow.com/questions/47789/generator-expressions-vs-list-comprehensions/62709748#62709748

* more readable
2024-02-16 07:41:55 +01:00
Marc Mueller afcb7a26cd
Enable strict typing for config (#108023) 2024-01-18 09:20:19 +01:00
J. Nick Koston 60ab360fe7
Avoid bytes to string to bytes conversion in websocket api (#108139) 2024-01-16 21:37:34 +01:00
Erik Montnemery 8983f665cf
Refactor device registry JSON cache (#85539) 2023-01-09 09:50:27 -10:00
Erik Montnemery 11c174aca3
Revert "Add aliases to device registry items" (#84976) 2023-01-02 12:30:25 +01:00
Erik Montnemery 057bb6ea0a
Add aliases to device registry items (#84246) 2022-12-20 23:43:31 +01:00
Erik Montnemery 0d8cd2d067
Shuffle some device registry WS code (#84243)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-12-19 21:56:07 +01:00
epenet 5442d6af01
Improve msg type hint in websocket commands (#80530) 2022-10-18 16:41:17 +02:00
Erik Montnemery 53263ea9bc
Revert "Add serial_number to device registry entries" (#79139) 2022-09-27 16:36:38 +02:00
Erik Montnemery cba3b6ad94
Add serial_number to device registry entries (#77713) 2022-09-27 09:08:54 +02:00
Erik Montnemery 8924725d69
Improve some device registry tests (#77659) 2022-09-02 08:54:02 +02:00
J. Nick Koston 3875fc5953
Cache the response from config/device_registry/list (#74483) 2022-07-05 21:08:39 -07:00
Erik Montnemery c496748125
Add WS API for removing a config entry from a device (#66188)
* Add WS API for removing a config entry from a device

* Address review comments

* Address review comments

* Remove entity cleanup from ConfigEntries

* Update + add tests

* Improve comments in test

* Add negative test

* Refactor according to review comments

* Add back async_remove_config_entry_device

* Remove unnecessary error handling

* Simplify error handling
2022-02-21 10:11:18 +01:00
Joakim Sørensen 63d3a47599
disabled_by can be None when updating devices (#65934) 2022-02-06 20:23:31 +01:00
Paulus Schoutsen 8574ee04ba
Fix passing a string to device registry disabled_by (#65701) 2022-02-04 10:55:45 -08:00
Erik Montnemery 9c9dc4cb8c
Import websocket_api (part 1) (#63905) 2022-01-11 18:24:08 +01:00
J. Nick Koston 04153c0075
Add hardware version to the device registry (#61650) 2021-12-16 05:16:19 -06:00
Ville Skyttä 9f4de8df18
Make device entry disabled by an enum (#60239) 2021-11-24 22:32:16 +01: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
Erik Montnemery bdbedd0f06
Alphabetize parts of device registry code (#57532) 2021-10-12 12:08:59 +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
Erik Montnemery dc8364fd3a
Support disabling devices (#43293) 2020-11-26 16:45:02 +01:00
Charles Garwood 49cbc9735c
Add identifiers to device registry api output (#38427) 2020-07-31 15:47:01 +02:00
Paulus Schoutsen b90cb09fd1
Add type to device registry (#35095) 2020-05-03 13:56:58 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Penny Wood 84e6813779 Rename via_hub to via_device (#24360)
* Rename via_hub to via_device

* Fixed registry interactions
2019-06-10 09:10:44 -07:00
Paulus Schoutsen 22ab5a498f
Change how we import config modules (#21824) 2019-03-08 14:09:18 -08:00
David F. Mulcahey c4400be62a Add friendly name to devices in the device registry (#21318)
* add friendly name to devices in the device registry

* switch to name_by_user

* review comments
2019-02-26 12:20:16 -08:00
Paulus Schoutsen 7c9597f824
Fix area registry config being loaded (#20598)
* Fi area registry config being loaded

* Mark area_id optional
2019-01-30 09:41:55 -08:00
Robert Svensson bd335e1ac1 Area registry (#20435)
* 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
Paulus Schoutsen 4210835dcd Async response all the things (#17073)
* Use async_response

* Update device_registry.py
2018-10-03 07:53:54 +02:00
cdce8p 7f0a50ce31 async_create_task (#17059)
* async_create_task

* Update google.py
2018-10-02 11:03:09 +02:00
Paulus Schoutsen 2e6346ca43 Break up websocket 2 (#17028)
* Break up websocket 2

* Lint+Test

* Lintttt

* Rename
2018-10-01 16:09:31 +02:00
Paulus Schoutsen b8257866f5
Clean up device update, add via-hub (#16659)
* 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
Paulus Schoutsen 05c0717167
Add websocket list APIs for the registries (#16597)
* Add websocket list APIs for the registries

* Remove identifiers

* Fix tests

* Use ordered dict
2018-09-14 11:57:18 +02:00