Commit Graph

74 Commits (8c3c2ad8e34e14bbe5d9c68b44166bb9c8fecbb2)

Author SHA1 Message Date
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
Jason Hu 6ba2891604 Add trusted_users in trusted networks auth provider (#22478) 2019-03-27 21:53:11 -07:00
Rohan Kapoor 481439d387 Deprecate conf_update_interval (#20924)
* Deprecate update_interval and replace with scan_interval

* Update tests

* Fix Darksky tests

* Fix Darksky tests correctly

This reverts commit a73384a223ba8a93c682042d9351cd5a7a399183.

* Provide the default for the non deprecated option

* Don't override default schema for sensors
2019-02-17 06:23:09 +01:00
Rohan Kapoor d5fad33599 Add better handling of deprecated configs (#20565)
* Add better handling of deprecated configs

* Embed the call to has_at_most_one_key in deprecated

* Add tests for checking the deprecated logs

* Add thoroughly documented tests

* Always check has_at_most_one_key

* Fix typing

* Move logging helpers to homea new logging helper

* Lint

* Rename to KeywordMessage instead of BraceMessage

* Remove unneeded KeywordStyleAdapter

* Lint

* Use dict directly rather than dict.keys() when creating set

* Patch the version in unit tests, update logging and use parse_version

* Re-add KeywordStyleAdapter and fix tests

* Lint

* Lint
2019-02-08 11:14:50 +01:00
Paulus Schoutsen 59393ab085
Prevent template changing options (#20775)
* Prevent complex template validation changing input value

* Remove deprecation warnings
2019-02-06 11:15:27 -08:00
emontnemery b1faad0a50 Use PLATFORM_SCHEMA_BASE as base schema for additional components. (#20578)
* Disable extra=vol.ALLOW_EXTRA for additional platforms.

* Remove PLATFORM_SCHEMA_2

* Add entity_namespace to base platform schema
2019-02-04 21:52:19 -08:00
Paulus Schoutsen 87316c4e83
Warn for old slugs/entity ids (#20478)
* Warn for old slugs/entity ids

* add comments

* Lint

* LInt

* Lint

* Lint
2019-01-26 14:09:41 -08:00
Anders Melchiorsen 62844e237c Allow 'all' entity_id in service schema (#20278) 2019-01-20 16:33:39 -08:00
Thomas Lovén f73bda1218 Allow other icon prefixes than mdi: (#19872) 2019-01-08 20:08:20 -08:00
Paulus Schoutsen 8ea0a8d40b
RFC: Deprecate auto target all for services and introduce entity_id: * (#19006)
* Deprecate auto target all

* Match on word 'all'
2018-12-13 10:07:59 +01:00
Anders Melchiorsen 6e81ae096e Disallow list/dict for string configuration (#17202) 2018-10-07 12:35:44 +02:00
Paulus Schoutsen 834077190f
Clean up input-datetime (#16000) 2018-08-16 22:17:14 +02:00
Lukas Barth af8cd63838 Matrix Chatbot (#13355)
* Add first version of the Matrix bot

* It's a stupid but necessary change…

* Dont list it twice

* All hail the linter!

* More linter-pleasing

* Use the correct user ID

* Add expression commands

* Add tests for new validators

* Fix room alias handling

* Wording

* Defer setup

* Simplify commands

* Handle exceptions

* Update requirements

* Review

* Move login back to constructor

* Fix review comments
2018-05-05 10:00:36 -04:00
Paulus Schoutsen 83d300fd11 Custom component loading cleanup (#14211)
* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
2018-05-01 20:57:30 +02:00
cdce8p 6e6ae173fd Added config validator for future group platforms (#12592)
* Added cv.EntitiesDoamin(domain) validator

* Check if all entities in string or list belong to domain
* Added tests

* Use factory function and entity_ids

* Different error message

* Typo

* Added entity_domain validator for a single entity_id

* Image_processing platform now uses cv.entity_domain for source validation
2018-02-25 23:48:21 -08:00
Paulus Schoutsen 1e672b93e7
Fix voluptuous breaking change things (#12611)
* Fix voluptuous breaking change things

* Change xiaomi aqara back
2018-02-22 23:29:42 -08:00
Anders Melchiorsen 9e0ca719ed Deprecate explicit entity_id in template platforms (#11123)
* Deprecate explicit entity_id in template platforms

* Use config validator for deprecation

* Fix copy/paste typos

* Also print the config value

* Add test for config validator

* Assert the module name that logged the message
2018-01-10 00:06:26 -08:00