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
35e2f591c1
Make `cv.string` return subclasses of str as is ( #103916 )
2023-12-04 20:36:16 +01:00
Paul Bottein
38eda9f46e
Add multiple option to text selector ( #104635 )
...
Co-authored-by: Robert Resch <robert@resch.dev>
2023-11-29 18:32:32 +01:00
Ville Skyttä
f4bf8fa8f1
Catch HTML case insensitively in "no HTML" config validation ( #101181 )
2023-10-01 16:19:24 +02:00
Ville Skyttä
6399d74c15
Remove unnnecessary pylint configs from core ( #98704 )
2023-08-22 23:12:12 +02:00
Jan Bouwhuis
9424d11408
Allow homeassistant in MQTT configuration_url schema ( #96107 )
2023-07-22 22:50:58 +02:00
Jan Bouwhuis
18ee9f4725
Refactor async_get_hass to rely on threading.local instead of a ContextVar ( #96005 )
...
* Test for async_get_hass
* Add Fix
2023-07-07 14:52:38 -04:00
Paulus Schoutsen
243abf32c0
Add test to stop action ( #95376 )
2023-06-27 19:38:30 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap ( #94359 )
2023-06-27 17:42:46 +02:00
Erik Montnemery
f9037d5f6d
Add platform only config schema to nsw_fuel_station and ping ( #93913 )
2023-06-01 17:30:15 +02:00
Erik Montnemery
c1c319d4d1
Rename `cv.no_yaml_config_schema` to `cv.config_entry_only_config_schema` ( #93908 )
...
* Rename cv.no_yaml_config_schema to cv.config_entry_only_config_schema
* ✏️
2023-06-01 13:15:48 +02:00
Erik Montnemery
e0db9ab041
Add CONFIG_SCHEMA to broadlink ( #93854 )
...
* Add CONFIG_SCHEMA to broadlink
* Simplify error message
* Rename to no_yaml_config_schema
* Add tests
* Raise issue
* Tweak repairs issue description and title
* Update homeassistant/helpers/config_validation.py
* Add link
* Update homeassistant/components/homeassistant/strings.json
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Fix logic, add test
---------
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-01 09:51:26 +02:00
Erik Montnemery
8b662dc94f
Detect attempt to setup config entry integration via YAML ( #93589 )
2023-05-29 21:01:47 +02:00
Erik Montnemery
49c3a8886f
Make cv.empty_config_schema log an error instead of raise ( #93646 )
...
* Make cv.empty_config_schema log an error instead of raise
* Add test
* Update homeassistant/helpers/config_validation.py
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
---------
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-05-28 15:54:22 +02:00
Erik Montnemery
18cb53a35c
Pass hass instance when validating templates ( #89242 )
...
* Pass hass instance when validating templates
* Update tests
* Fix validating templates without hass
* Update service tests
2023-03-08 11:28:53 -05:00
Erik Montnemery
cc4a179ca8
Support templating for in state conditions ( #88411 )
2023-02-20 18:57:00 +01:00
epenet
5f25b71df7
Add type hints to core tests ( #88478 )
2023-02-20 11:42:56 +01:00
epenet
59ca7780fa
Add typing to tests with single hass argument ( #87631 )
2023-02-07 15:01:16 +01:00
epenet
4142f0d15d
Add return type to tests without arguments ( #87613 )
...
* Add return type to tests without arguments
* Black
* Cancel fixture amends
2023-02-07 14:20:06 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 ( #87347 )
2023-02-03 23:08:48 +01: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
c3d4a9cd99
Create repairs issue if an outdated currency code is configured ( #81717 )
...
* Create repairs issue if an outdated currency code is configured
* Add script for updating list of currencies
* Use black for formatting
* Move currency codes to a separate file
* Address review comments
2022-11-08 07:21:09 +01:00
Paulus Schoutsen
353cc0b8c2
Fix importing blueprints ( #71365 )
...
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-05-05 14:33:17 -07:00
Erik Montnemery
a9742cc445
Drop frontend metadata from entity service schemas ( #69894 )
2022-04-12 18:09:06 +02:00
Bram Kragten
ef34f070ee
Allow metadata in service call data ( #66672 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2022-02-16 21:13:36 +01:00
Erik Montnemery
cbcd6d458e
Assert current state of script condition validation in tests ( #62486 )
2021-12-21 14:10:05 +01:00
Erik Montnemery
e2fca2e305
Support shorthand templates in condition actions ( #61177 )
...
* Support shorthand templates in condition actions
* Fix validation message
* Fix tests
2021-12-21 12:19:31 +01:00
Erik Montnemery
c85bb27d0d
Teach state trigger about entity registry ids ( #60271 )
...
* Teach state trigger about entity registry ids
* Tweak
* Add tests
* Tweak tests
* Fix tests
* Resolve entity ids during config validation
* Update device_triggers
* Fix mistake
* Tweak trigger validator to ensure we don't modify the original config
* Add index from entry id to entry
* Update scaffold
* Pre-compile UUID regex
* Address review comment
* Tweak mock_registry
* Tweak
* Apply suggestion from code review
2021-12-02 14:26:45 +01:00
Erik Montnemery
a62bc6b3b9
Minor tweak of cv.deprecated + cv.removed ( #59095 )
...
* Minor tweak of cv.deprecated + cv.removed
* Satisfy pylint
2021-11-04 19:12:21 +01:00
Jan Bouwhuis
c3fc19915e
Mqtt fan fail deprecated options for classic speeds ( #58992 )
...
* Fail deprecated options
* new removed validator
* correct module_name - add tests
* Add test cant find module cv.removed
* module name from stack+1
* Remove error from log. Just throw.
* assert on thrown exception text
* cleanup formatting remove KeyStyleAdapter
* format the replacement_key and update test
* deprecated vs removed - add raise_if_present opt
* doc string update
* is deprecated
2021-11-04 17:54:27 +01:00
Børge Nordli
0d654fa6b3
Extract attribute names out of vol.Optional when validating entity service schema ( #55157 )
2021-08-25 13:00:11 +02:00
Paulus Schoutsen
952d11cb03
Ensure internal/external URL have no path ( #54304 )
...
* Ensure internal/external URL have no path
* Fix comment typo
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-09 09:38:09 +02:00
Franck Nijhof
1968b95829
Add currency core configuration ( #53541 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:55:58 +02:00
Paulus Schoutsen
45e1473f83
Improve config validation for key_value_schemas ( #49429 )
2021-06-01 11:23:59 +02:00
Franck Nijhof
5a2b5fe7c5
Yoda assertion style removed is ( #48142 )
2021-03-20 13:55:10 +01:00
Alan Tse
f86e7535e0
Add location details to deprecation warning ( #47155 )
2021-03-16 21:16:07 +01:00
Erik Montnemery
2d70806035
Add support for "alias" in script steps device, device_condition, and conditions ( #46647 )
...
Co-authored-by: Donnie <donniekarnsinsb@hotmail.com>
2021-02-20 19:21:09 -08:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Paulus Schoutsen
594e905742
Remove invalidation_version from deprecated ( #44156 )
...
* Remove invalidation_version from deprecated. We don't follow up and just hurts releases
* Revert change to ZHA
2020-12-12 22:24:16 +01:00
Franck Nijhof
b1c11eaaf8
Fix config validation tests for upcoming beta ( #43811 )
2020-12-01 17:07:28 +01:00
Paulus Schoutsen
0a717f313e
Improve entity domain validator ( #43164 )
2020-11-13 13:31:43 +01:00
Paulus Schoutsen
aec191b558
Support datetime sensor in time trigger ( #42899 )
2020-11-09 14:50:54 +01:00
Paulus Schoutsen
e552c9ba96
Store original result on template results ( #42391 )
...
* Store original result on template results
* Fix shell command test
2020-10-26 11:30:58 +01:00
Raman Gupta
d3734aae9d
Allow custom_serializer to recognize cv.string and cv.boolean to make config schema more reusable ( #41532 )
2020-10-09 09:36:54 +02:00
Franck Nijhof
181709f3d2
Allow templates in data & service parameters (making data_template & service_template obsolete) ( #39210 )
2020-08-24 16:21:48 +02:00
J. Nick Koston
1381b279f0
Update template sensor to use async_track_template_result ( #38940 )
...
* Add template entity
* Update template tracking to work for template sensors
* add test for whitespace
* Update homeassistant/helpers/config_validation.py
* revert
* fix
* reduce
* fix _refresh missing decorator
* defer until start
* do not throw errors during startup
* defer tracking until start event
Co-authored-by: Swamp-Ig <github@ninjateaparty.com>
2020-08-20 08:06:41 -05:00
Phil Bruckner
726d5fdd94
Allow float values in time periods ( #38023 )
2020-07-21 19:41:42 -05:00
Ville Skyttä
29b8f76e57
Use past tense in messages for already invalidated deprecated configs ( #36591 )
2020-06-09 23:26:55 -07:00
Franck Nijhof
e86bedb223
Prevent possible secret values to show up in deprecation logs ( #36368 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-02 17:29:59 +02:00
Bram Kragten
cb7b8d94c0
Add check for HTML in translations ( #35615 )
...
* Add check for HTML in translations
and remove existing html
* Add test
2020-05-14 19:33:14 +02:00