Erik Montnemery
3e62c6ae2f
Move core config functionality to its own module ( #129065 )
...
* Move core config functionality to its own module
* Adjust test
2024-10-24 13:34:51 +02:00
Erik Montnemery
487593af38
Allow configuring WebRTC stun and turn servers ( #128984 )
...
* Allow configuring WebRTC stun and turn servers
* Add tests
* Remove class WebRTCCoreConfiguration
2024-10-23 14:41:45 +02:00
epenet
ba3872ff87
Add missing hass type in tests/*.py ( #124048 )
2024-08-18 15:42:41 +02:00
epenet
075550b7ba
Use HOMEASSISTANT_DOMAIN alias for core DOMAIN in tests ( #122762 )
2024-07-29 12:51:12 +02:00
Marc Mueller
a6068dcdf2
Update import locations in tests ( #122216 )
2024-07-20 11:16:04 +02:00
J. Nick Koston
1144e23d8d
Fix blocking I/O in config tests ( #121144 )
2024-07-04 05:21:30 +01:00
Marc Mueller
ca55986057
Import Generator from collections.abc (1) ( #120914 )
2024-07-01 11:51:51 +02:00
Joost Lekkerkerker
03c6e0c55f
Fix SIM300 ( #120725 )
2024-06-28 10:46:02 +02:00
G Johansson
127af149ca
Remove legacy template hass config option ( #119925 )
2024-06-21 12:53:55 +02:00
Robert Resch
bae008b0e2
Remove legacy_api_password auth provider ( #119976 )
2024-06-19 22:46:30 +02:00
epenet
f0dc39a903
Improve typing in core tests ( #119958 )
...
Add missing return values in core tests
2024-06-19 19:58:07 +02:00
Erik Montnemery
7e61ec96e7
Make the radius of the home zone configurable ( #119385 )
2024-06-15 13:22:01 +02:00
epenet
01be5d5f6b
Move fixtures to decorators in core tests ( #119675 )
2024-06-14 13:32:42 +02:00
epenet
abb8c58b87
Fix consider-using-tuple pylint warnings in core tests ( #119463 )
2024-06-12 12:35:01 +02:00
epenet
7388271689
Fix unspecified-encoding warnings in tests ( #119405 )
2024-06-11 17:58:40 +02:00
epenet
bdf69c2e5b
Remove deprecated imports in config tests ( #119393 )
2024-06-11 16:11:10 +02:00
epenet
0b4f1cff98
Use issue_registry fixture in core tests ( #118042 )
2024-05-24 15:26:32 +02:00
J. Nick Koston
53a179088f
Add debug mode to catch unsafe thread operations using core helpers ( #115390 )
...
* adjust
* adjust
* fixes
* one more
* test
* debug
* move to config
* cover
* Update homeassistant/core.py
* set debug from RuntimeConfig
* reduce
* fix message
* raise
* Update homeassistant/core.py
* Update homeassistant/core.py
* no flood check for raise
* cover
2024-04-24 03:36:05 +02:00
Sid
025c6f5e2e
Add `__slots__` to NodeClass classes ( #115079 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-08 08:44:18 -10:00
Sid
304ed8bf3d
Unignore Ruff PLC in tests ( #114572 )
2024-04-01 21:28:54 +02:00
Sid
d5f883fbf0
Unignore Ruff PLR in tests ( #114470 )
...
* Unignore Ruff PLR in tests
* Address review comments
* review comments
* fix import
* Update test_api.py
* Update test_api.py
* Update test_api.py
2024-04-01 11:11:59 +02:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ( #112690 )
...
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Jan Bouwhuis
19fa39d556
Generate ConfigValidationError message from English translations ( #113844 )
...
* Fetch ConfigValidationError message from translation cache
* Sync error logmessages with translation cache
* More sync
* Cleanup
* Remove unrelated change
* Follow up comments
* Rebase and improve contructor
* Improve name
* Rename to MULTIPLE_INTEGRATION_CONFIG_ERRORS
2024-03-25 10:39:30 +01:00
Jan Bouwhuis
a4f52cc622
Use a constant to reference `homeassistant` domain ( #113889 )
...
* Use CONF_CORE to reference `homeassistant` domain
* Just use DOMAIN
* USE DOMAIN for `homeasistant` domain in config_schema.py
* Use DOMAIN_HA as constant for homeassistant domain
* Rename CONF_CORE to DOMAIN_HA
* Rename DOMAIN_HA to HA_DOMAIN
* Use relative import
* Use direct imports
2024-03-23 19:58:39 +01:00
Sid
00ec7f11f0
Enable Ruff rule PT007 ( #113764 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Sid
fe9cc6705c
Add ruff rule PIE804 ( #113620 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 12:45:18 -10:00
J. Nick Koston
7d58be1a6a
Gather loading platforms in async_process_component_config ( #113573 )
2024-03-16 10:57:10 -10:00
J. Nick Koston
4174d88ad7
Add a guard to handle unhashable platforms in config ( #113607 )
...
Someone might set the platform to [fitbit] instead of fitbit
I have not seen anyone do this, but its good to guard against
it
2024-03-16 16:19:07 -04:00
J. Nick Koston
eb90c9a548
Reduce bottlenecks in bootstrap by ordering the setup of integrations ( #113570 )
2024-03-15 22:38:06 -10:00
Marc Mueller
19ab3d6daf
Add empty line after module docstring [helpers + other] ( #112707 )
2024-03-08 10:36:11 -05:00
J. Nick Koston
6a243d6705
Preload platform integrations to better group executor usage ( #112010 )
2024-03-02 23:03:35 -10:00
J. Nick Koston
3808e8b0bc
Switch config to use async_get_component/async_get_platform ( #112071 )
2024-03-02 13:56:25 -10:00
chammp
a5cc0ae890
Improve package schema validation ( #108125 )
...
* Add failing tests for package config validation error wrapping
* Wrap package schema validation errors in HomeAssistantError
* Fix yamllint errors
* Rework package merge validation
Ignore invalid package definitions instead of failing startup.
Output error messages with locations if possible when a package
definition has errors.
* Ruff format
* Fix linter errors
* Move package_definition_schema to module scope
* Move inner function to module level
* Merge exception handlers
Merge exception handlers for config schema validation and package merge
to avoid untested code branches
* Fix long lines and doc strings
* More minor changes to exception handler
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-02-10 20:16:20 +01:00
Robert Resch
8b08b5e8d2
Deprecate legacy_templates ( #105556 )
...
* Deprecate legacy_templates
* Improve wording
* Implement suggestion
* simplify
* Add deleting of the repair issues back
* Update homeassistant/components/homeassistant/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Test issue removal too
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-22 00:42:16 +01:00
Erik Montnemery
3bcc6194ef
Add domain key config validation ( #104242 )
...
* Drop use of regex in helpers.extract_domain_configs
* Update test
* Revert test update
* Add domain_from_config_key helper
* Add validator
* Address review comment
* Update snapshots
* Inline domain_from_config_key in validator
2023-12-05 15:07:32 +01:00
Erik Montnemery
95f7db1970
Move config_per_platform and extract_domain_configs to config.py ( #104989 )
2023-12-04 12:48:49 +01:00
Jan Bouwhuis
af71c2bb45
Raise and suppress stack trace when reloading yaml fails ( #102410 )
...
* Allow async_integration_yaml_config to raise
* Docstr - split check
* Implement as wrapper, return dataclass
* Fix setup error handling
* Fix reload test mock
* Move log_messages to error handler
* Remove unreachable code
* Remove config test helper
* Refactor and ensure notifications during setup
* Remove redundat error, adjust tests notifications
* Fix patch
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Follow up comments
* Add call_back decorator
* Split long lines
* Update exception abbreviations
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-24 17:34:45 +01:00
Erik Montnemery
124e1cebac
Small improvement of config tests ( #104243 )
...
* Small improvement of config tests
* Update snapshots
2023-11-20 14:15:29 +01:00
Erik Montnemery
d8a49b14e5
Use relative paths in configuration validation error messages ( #104064 )
2023-11-16 10:56:47 +01:00
Erik Montnemery
98030a9ce1
Improve formatting of package errors ( #103976 )
2023-11-16 09:08:47 +01:00
Erik Montnemery
5b37096b5f
Refactor config.async_log_exception ( #104034 )
...
* Refactor config.async_log_exception
* Improve test coverage
* Make functions public
2023-11-15 19:09:49 +01:00
Erik Montnemery
c4bf8f96dd
Add tests for components with custom validators ( #104024 )
...
* Add tests for components with custom validators
* Address review comments
2023-11-15 13:11:33 +01:00
Erik Montnemery
2cb4435cf0
Add tests for component configuration with documentation links ( #103971 )
2023-11-14 17:14:34 +01:00
Erik Montnemery
381ebf3e53
Add tests for component configuration with multiple errors ( #103964 )
...
* Add tests for component configuration with multiple errors
* Add new configuration file
* Fix typo
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-14 15:08:20 +01:00
Erik Montnemery
44c1cef42e
Add tests for component configuration with extra keys ( #103959 )
2023-11-14 11:26:22 +01:00
Erik Montnemery
e64582ae9a
Add tests for yaml syntax errors ( #103908 )
2023-11-13 14:04:58 +01:00
Erik Montnemery
be2cee228c
Add tests for package errors ( #103902 )
2023-11-13 11:21:37 +01:00
Erik Montnemery
d0efea3dbd
Add tests for configuration validation errors ( #103848 )
...
* Add tests for configuration validation errors
* Use absolute path for hass.config.config_dir
* Apply suggestions from code review
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-13 07:25:58 +01:00
Erik Montnemery
97cc05d0b4
Make it possible to restart core in safe mode ( #102606 )
2023-10-24 14:47:58 +02:00
Ville Skyttä
6399d74c15
Remove unnnecessary pylint configs from core ( #98704 )
2023-08-22 23:12:12 +02:00