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
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ( #35109 )
...
* Use asynctest-mock in most places
* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Franck Nijhof
98a2efcbab
Collection of random (mainly) test improvements ( #33733 )
2020-04-06 12:51:48 +02:00
Paulus Schoutsen
6a21afa2a8
Improve script validation ( #32461 )
2020-03-05 11:44:42 -08:00
Ruslan Sayfutdinov
15b4975681
Use ciso8601 library to parse datetime faster ( #32128 )
2020-02-24 08:33:10 -08:00
Paulus Schoutsen
ca01e9a537
Improve condition validation error msg ( #32135 )
2020-02-24 09:59:34 +01:00
Robert Svensson
043d36f7c6
Change multi_select config validator to class ( #31828 )
...
* Move multi_select to class
* Fix serializer and add test
* Serializer should also return options
2020-02-14 11:09:40 -08:00
Robert Svensson
6211a2bb98
Add multi select support to config validation and to custom serializer ( #31798 )
2020-02-13 13:12:09 -08:00
Paulus Schoutsen
eef91f843d
Rendering complex template objects to leave non-template values alone ( #29353 )
2019-12-03 14:15:45 -08:00
Franck Nijhof
2e17ad86af
Adds guards for missing information in call stack frames ( #27217 )
2019-10-05 11:59:33 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen
27d750db1c
Guard module being None ( #25077 )
2019-07-11 09:38:58 +02:00
Penny Wood
b30f4b8fc0
Improve boolean validator ( #24294 )
...
* Improve boolean validator
* Remove extra throw
* Remove None test as discussed
* Fix for tests depending on None == False
2019-06-07 22:18:02 -07:00
Paulus Schoutsen
59ce31f44f
No longer allow invalid slugs or extra keys ( #24176 )
...
* No longer allow slugs
* Lint
* Remove HASchema
* Lint
* Fix tests
2019-05-30 13:33:26 +02:00
Johann Kellerman
3453d67cfe
Person schema for merge_packages #21307 ( #21703 )
...
* Person schema for merge_packages #21307
* empty list
* skip empty persons
* hound
* test schema
* ensure_none
* remove any test changes
* remove_falsy validator
* nice!
* coretests
2019-04-02 19:43:06 -07:00