Commit Graph

302 Commits (685553d17d55cfa1ee9406f8aa454a355f37022b)

Author SHA1 Message Date
Franck Nijhof 0e2775667d
Add category registry (#110897)
* Add category registry

* Add entity registry support

* Update homeassistant/components/config/entity_registry.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use ulid instead

* Add tests for adding same name in different scopes

* Handle keyerror on update

* Lookup tweak

* Omit categories from entity registry snapshots

* Use base registry

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-15 13:25:16 +01:00
Franck Nijhof 436c83e8a7
Add theme color support to labels (#113404) 2024-03-15 13:22:06 +01:00
Franck Nijhof 221893c1d7
Add aliases support to floor registry WebSocket API (#113401) 2024-03-14 23:07:07 +01:00
Franck Nijhof 064f96f8fa
Add floor support to areas WebSocket API (#113402) 2024-03-14 12:55:31 +01:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Marc Mueller f3594c543d
Use KEY_HASS [a-g] (#112609) 2024-03-07 18:09:20 +01:00
J. Nick Koston 3f9dbd3e25
Fix config modules being imported in the event loop (#112462)
* Fix config modules being imported in the event loop

There was a late import in this integration because of the circular import.

The code has been rearranged to avoid the circular imports

* fixes

* fixes

* fix patching

* make eager

* remove unrelated change from this branch
2024-03-05 21:18:57 -05:00
Erik Montnemery 3d3e9900c3
Add TypeVar default for FlowResult (#112345)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-03-05 22:52:11 +01:00
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
G Johansson 9989a63cdf
Add reconfigure step to config flow (#108794)
* Initial commit reconfigure

* test config config_entries

* Fix reconfigure

* test_config_entries

* review comment

* No reconfigure if reauth ongoing

* Fix tests

* Fix tests

* handle source creating flows

* combine

* No black

* Also check reconfigure in reauth flow

* Fix support

* Add entry id

* reset data entry flow

* Mods

* context data

* reset formatting

* Fix config flow platforms

* Fix tests

* Fix step message

* Handling reconfigure step

* Fix more tests

* Config entries tests

* entry_id always means reconfigure

* Mods

* Remove no longer valid exception

* Fixes

* reset silabs test

* dev reg

* resets

* assist pipeline

* Adjust config_entries

* Fix

* Fixes

* docstrings

* Review comment

* docstring
2024-03-01 12:29:35 +01:00
Franck Nijhof e0a9dcd996
Add label registry (#110821) 2024-02-19 11:59:08 +01:00
J. Nick Koston aab21105da
Convert config entry subscriptions to callback (#110900) 2024-02-18 19:36:53 -06:00
J. Nick Koston 0a01161cdd
Cache JSON representation of ConfigEntry objects (#110823)
* Cache JSON representation of ConfigEntry objects

* fix recursive set

* tweak

* adjust

* order
2024-02-17 20:52:39 -05:00
Franck Nijhof 4570eed6f6
Add floor registry (#110741)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-17 21:21:15 +01:00
J. Nick Koston 0bf95df4d6
Avoid creating tasks to setup ignored and disabled config entries (#110756)
* Avoid creating tasks to setup ignored and disabled config entries

* lint
2024-02-17 10:34:03 +01: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
G Johansson cb776593cf
Make context in data entry flow possible to modify for subclasses (#110561)
* Make context in data entry flow possible to modify for subclasses

* mypy

* Make get_context

* base view

* Review comments

* Remove context from options flow
2024-02-16 15:51:51 +01: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
J. Nick Koston dff5e45761
Small speed up to listing config entries in the websocket api (#108892) 2024-01-25 20:20:19 -10:00
Erik Montnemery 9c727e5ea8
Add icon to areas (#108650) 2024-01-24 19:11:03 +01:00
Erik Montnemery fcf72ae0c2
Fix race when deleting an automation (#108772) 2024-01-24 15:27:09 +01:00
J. Nick Koston 78d7562b41
Avoid json default fallback for area registry (#108358) 2024-01-19 13:16:05 +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 3ba8a82243
Differentiate between warnings and errors in check_config helper (#102902)
* Differentiate between warnings and errors in check_config helper

* Update tests

* Treat configuration errors in frontend and its dependencies as errors

* Improve test coverage

* Address review comments

* Improve test coverage

* Improve test coverage

* Address review comments

* Add comment
2023-11-05 03:08:04 +01:00
J. Nick Koston 7b2aa3a369
Improve performance of config/entity_registry/get* calls (#101984) 2023-10-14 08:40:16 -10:00
Ville Skyttä 3b4774d9ed
Remove unnnecessary pylint configs from components/[a-d]* (#98911) 2023-08-24 00:54:02 +02:00
Robert Resch b0f68f1ef3
Use @require_admin decorator (#98061)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-14 15:07:20 +02:00
Franck Nijhof 50ef674902
Use require_admin decorator for check_config permissions (#98028) 2023-08-08 12:19:20 +02:00
Franck Nijhof 40e256847c
Add is_admin checks to scene/script/automation APIs (#98025) 2023-08-08 12:11:52 +02:00
Franck Nijhof b286da211a
Add is_admin check to check configuration API (#97788) 2023-08-04 19:25:01 +02:00
Erik Montnemery 8053073a77
Add empty config schema to integrations a-c (#93608) 2023-05-29 14:38:33 -04:00
Marvin Wichmann 795ef075da
Restore original websocket commands for config entries (#93707)
Restore original websocket commands and add "config_entries/get_single"
2023-05-28 21:40:35 -04:00
Erik Montnemery b754f03eb1
Add WS command for getting a config entry (#93387)
* Add WS command for getting a config entry

* Update tests
2023-05-23 10:44:02 +02:00
J. Nick Koston cf69da40f3
Only check support_entry_unload/support_remove_from_device once (#92041) 2023-04-26 10:23:18 +02:00
epenet f2b736fad0
Adjust entity registry access in core platforms (#88944)
* Adjust entity registry access in platforms

* Adjust more core components
2023-03-01 08:02:16 +01:00
J. Nick Koston e38836b6e1
Update async_matching_config_entries to use async_get_integrations (#88527)
* Update async_matching_config_entries to use async_get_integrations

* Update homeassistant/components/config/config_entries.py

* Update homeassistant/components/config/config_entries.py
2023-02-21 21:17:18 -05:00
Erik Montnemery 0c4c95394e
Add WS command config/entity_registry/list_for_display (#87787)
* Add WS command config/entity_registry/list_for_display

* Make more keys in the display dict optional

* Move disabled_by check to ws command handler

* Hide hidden_by if not hidden

* Use send_json_auto_id in the new test

* Don't include entities which have no data needed for display

* Include platform for entries with translation_key
2023-02-21 20:40:39 +01:00
Erik Montnemery 87420e949d
Sort manifests 2 (#87023) 2023-02-08 20:16:39 +01:00
Erik Montnemery 93dafefd96
Include entity options in RegistryEntry.as_partial_dict (#87539) 2023-02-08 08:32:46 -05:00
Erik Montnemery 4d4fb2477d
Optionally update sensor units when unit system is changed (#83851) 2023-02-03 16:30:50 +01:00
Erik Montnemery 788edc21fb
Deduplicate some entity registry code (#85541) 2023-01-16 22:06:52 +01:00
Erik Montnemery 8983f665cf
Refactor device registry JSON cache (#85539) 2023-01-09 09:50:27 -10:00
Erik Montnemery b933a53aa3
Refactor entity registry JSON cache (#85085)
* Refactor entity registry JSON cache

* Fix generator

* Tweak

* Improve string building

* Improve test coverage

* Override EntityRegistryItems.values to avoid __iter__ overhead
2023-01-09 16:52:52 +01:00
Erik Montnemery 377396ba16
Add WS endpoint config/entity_registry/get_entries (#85063) 2023-01-05 09:39:10 -05:00
Erik Montnemery 11c174aca3
Revert "Add aliases to device registry items" (#84976) 2023-01-02 12:30:25 +01:00
Erik Montnemery 53637d486d
Improve error message when a script fails to validate (#84438) 2022-12-22 16:26:57 +01:00
Erik Montnemery 1a42bd5c4c
Add aliases to area registry items (#84294)
* Add aliases to area registry items

* Update test

* Fix WS API
2022-12-21 08:44:44 +01:00
Erik Montnemery 057bb6ea0a
Add aliases to device registry items (#84246) 2022-12-20 23:43:31 +01:00
Erik Montnemery 1f3da9cf1a
Add aliases to entity registry items (#84239) 2022-12-20 12:10:46 +01:00