Commit Graph

276 Commits (99e97782b6b742067ef8834e413c4d51124ba2ec)

Author SHA1 Message Date
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
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
Erik Montnemery 8e617bbc1d
Add `translation_key` property to entites (#82701)
* Add translation_key attribute to entity state

* Update accuweather test

* Index entity translation keys by platform

* Store translation key in entity registry
2022-12-01 09:34:09 +01:00
Bram Kragten 573320a0b4
Add country to detect location info (#82941) 2022-11-29 13:52:49 -05:00
Erik Montnemery e1338adf1a
Allow configuring country and language in core config (#81734)
* Allow configuring country and language in core config

* Add script for updating list of countries

* Use black for formatting

* Fix quoting

* Move country codes to a separate file

* Address review comments

* Add generated/countries.py

* Get default language from owner account

* Remove unused variable

* Add script to generate list of supported languages

* Add tests

* Fix stale docsring

* Use format_python_namespace

* Correct async_user_store

* Improve typing

* Fix with_store decorator

* Initialize language in core store migration

* Fix startup

* Tweak

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Update storage.py

Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-11-24 23:25:50 +01:00
Erik Montnemery 25d54f407e
Fix race when deleting a scene (#81896) 2022-11-10 17:27:26 +01:00
Erik Montnemery 2f9982d1c7
Fix race when deleting a script (#81897) 2022-11-10 17:27:14 +01:00
epenet 2c43606922
Add websocket type hints in components (#80654)
* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-20 13:41:14 +02:00
epenet b23a66d776
Add websocket type hints in entity_registry (#80657)
* Add websocket type hints in entity_registry

* Adjust websocket_list_entities

* Fix update

* Fix websocket_update_entity

* Apply suggestion

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

* Apply suggestion

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-10-20 12:20:39 +02:00
epenet 67d1dde69f
Rename IMPERIAL_SYSTEM to US_CUSTOMARY_SYSTEM (#80253)
* Rename IMPERIAL_SYSTEM

* Deprecate is_metric property and adjust tests

* Adjust unit_system config validation

* Add yaml tests

* Add tests for private name

* Fix incorrect rebase

* Adjust docstring

* Add store migration

* Update unit_system.py

* Minimise test tweaks

* Fix tests

* Add conversion to migration

* Rename new key and adjust tests

* Adjust websocket_detect_config

* Move original_unit_system tracking to subclass
2022-10-19 13:31:08 +02:00
Franck Nijhof c4bbc439a5
Integrations v2.1: Differentiating hubs, devices and services (#80524)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-19 12:41:43 +02:00
epenet 971ac015e7
Add websocket type hints in config (#80532) 2022-10-18 22:15:55 -04:00
epenet 5442d6af01
Improve msg type hint in websocket commands (#80530) 2022-10-18 16:41:17 +02:00
epenet bff5d1123f
Deprecate CONF_UNIT_SYSTEM_*** constants (#80320)
* Deprecate CONF_UNIT_SYSTEM_*** constants

* Adjust pylint plugin

* Add tests

* Remove single-use function

* Revert logic change

* Revert "Revert logic change"

This reverts commit 60959a0050.

* Tweak again
2022-10-14 16:50:04 +02:00
Franck Nijhof 2b27cfdabb
Set system & entity integration types (#79593) 2022-10-04 10:36:42 -04:00
Erik Montnemery c38b1e7727
Improve check of new_entity_id in entity_registry.async_update_entity (#78276)
* Improve check of new_entity_id in entity_registry.async_update_entity

* Fix race in rfxtrx config flow

* Make sure Event is created on time

* Rename poorly named variable

* Fix typing

* Correct typing of _handle_state_change
2022-09-28 08:43:58 +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
Bram Kragten 7e9be812ca
Add unique id to entity reg list response (#78945)
* Add unique id to entity reg list response

* Update test_entity_registry.py
2022-09-27 08:25:56 +02:00
epenet 13f250319d
Import websocket api constants from root (#78250) 2022-09-12 22:07:58 -04:00
J. Nick Koston 016a59ac94
Add support for subscribing to config entry changes (#77803) 2022-09-04 22:57:43 -05:00
Erik Montnemery 8924725d69
Improve some device registry tests (#77659) 2022-09-02 08:54:02 +02:00
Erik Montnemery d65eaf11f4
Include entity registry id in entity registry WS API (#77668) 2022-09-01 11:51:27 -04:00
Paulus Schoutsen 14f68ec1a9
Store redirect URI in context instead of asking each time (#77380)
* Store redirect URI in context instead of asking each time

* Fix tests
2022-08-29 19:28:42 -04:00
Erik Montnemery 2e228b2608
Tweak handling of entities with `has_entity_name` set (#74948)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-07-11 15:10:53 -07:00
J. Nick Koston ce35324e73
Cache the response from config/entity_registry/list (#74443) 2022-07-05 21:11:51 -07:00
J. Nick Koston 3875fc5953
Cache the response from config/device_registry/list (#74483) 2022-07-05 21:08:39 -07:00