Commit Graph

238 Commits (40a47c72f432d6bd74b30d1883feed16d1cdc9f0)

Author SHA1 Message Date
J. Nick Koston 93bfd7d8d0
Small speed up to validating entity ids (#92970) 2023-05-12 15:04:09 +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
Franck Nijhof 9030ca05b1
Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
epenet 810367b757
Fix `can not` typo (#87254) 2023-02-03 11:37:16 +01:00
Franck Nijhof 79b52a2b41
Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
Franck Nijhof 06a35fb7db
Code styling tweaks to core helpers (#85441) 2023-01-08 13:44:09 -10:00
epenet 9f7fd8956f
Use new unit enums in helpers (#83387) 2022-12-06 22:20:17 +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
Jan Bouwhuis 23bc39b7f4
Add type hints on `Template().__init__()` (#82574) 2022-11-23 20:26:55 +01:00
Aarni Koskela 4f7b583f19
Fix shadowing of outer name in config_validation (#82088)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-11-16 14:04:57 +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
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
Erik Montnemery 18033532ca
Fix search throwing on templated services (#79637) 2022-10-05 10:59:18 +03:00
Franck Nijhof 9843753f30
Add alias support to all triggers (#77184) 2022-08-22 17:43:09 -04:00
epenet a92105171c
Remove vizio from mypy ignore list (#73585)
* Remove vizio config_flow from mypy ignore list

* Fix mypy errors

* Adjust media_player

* Add space
2022-06-19 21:39:24 +02:00
Franck Nijhof 682ac52a20
Support shorthand logical operators in script sequences (#71022) 2022-04-29 18:06:21 +02:00
Erik Montnemery f6d9c75476
Remove metadata from device conditions and triggers (#70695) 2022-04-25 09:48:24 -07:00
Franck Nijhof 35687def02
Merge stop & error script actions (#70109) 2022-04-20 14:22:37 -07:00
Erik Montnemery 64381acbaf
Mark device actions from hidden or auxiliary entities as secondary (#70278) 2022-04-20 10:48:46 -07:00
Thomas Lovén b50f369fe4
Add shorthand notation for boolean conditions (#70120) 2022-04-18 22:09:09 +02:00
Franck Nijhof 1b48d7eda1
Add for each item support to repeat action (#70093) 2022-04-15 19:10:25 +02:00
Franck Nijhof e04fef3c2d
Allow disabling specific triggers/actions/conditions (#70082) 2022-04-15 09:33:09 -07:00
Franck Nijhof cdabcce83a
Add ability to continue scripts/automations on error (#70004) 2022-04-14 13:43:14 -07:00
Franck Nijhof d704d4f853
Add parallel automation/script actions (#69903) 2022-04-13 13:07:44 -07:00
Erik Montnemery a9742cc445
Drop frontend metadata from entity service schemas (#69894) 2022-04-12 18:09:06 +02:00
Franck Nijhof 67b200a532
Add if/else automation/script action (#69811)
Co-authored-by: Erik <erik@montnemery.com>
2022-04-12 15:02:17 +02:00
Franck Nijhof 81d90b1bc7
Add stop/error script/automation action (#67340) 2022-04-11 14:22:22 -07:00
Franck Nijhof 7087020283
Allow any entity to match state condition (#69763) 2022-04-11 10:53:42 -07:00
Paulus Schoutsen ad1e43e083
Add support for variables on trigger (#68275) 2022-03-18 09:25:22 +01:00
Marc Mueller eae0c75620
Make TypeVars private (2) (#68206) 2022-03-17 19:09:55 +01:00
Richard T. Schaefer 15580281a3
Allow area, device, and entity selectors to optionally support multiple selections like target selector (#63138)
* Allow area, device, and entity selectors to optionally support multiple selections like target selector

* Update according to code review comments

* Adjust tests

* Update according to review comments

* Tweak error message for multiple entities

Co-authored-by: Erik <erik@montnemery.com>
2022-03-03 10:35:06 +01:00
Paulus Schoutsen 756e711850
Add a new validate config WS command (#67057) 2022-02-22 22:28:37 +01:00
Erik Montnemery ec67dcb620
Add support for validating and serializing selectors (#66565)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-02-18 14:24:08 -08:00
Marc Mueller bfb1abd3a2
Add type ignore error codes [helpers] (#66776) 2022-02-18 11:31:37 +01: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
Marc Mueller d3b7bd25ef
Update typing (1) (#63922) 2022-01-11 21:26:03 +01:00
Erik Montnemery fc2025509e
Teach call service script action about entity registry ids (#61172) 2022-01-07 08:42:47 -08:00
Marc Mueller fcd80b2ed7
Fix `ensure_list` typing (#63311) 2022-01-04 15:23:48 +01:00
Tobias Sauerwein 2c904c0974
Bump mypy to 0.930 (#62642)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-12-27 17:55:17 +01:00
Ruslan Sayfutdinov 55f4962c06
Fix pylint plugin which checks relative imports (#62693) 2021-12-23 11:14:47 -08:00
Erik Montnemery e48f567176
Wrap shorthand template conditions during schema validation (#62485) 2021-12-21 17:20:15 +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 0e3bc21d54
Teach state and numeric_state conditions about entity registry ids (#60841) 2021-12-02 14:55:12 -08: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
Robert Hillis 16371e6579
Add missing ZMW currency (#58959) 2021-11-02 20:21:56 -07:00
Paulus Schoutsen 5deeeed672
Add some more required/optional tags to condition schemas (#58424) 2021-10-26 17:25:15 +02:00
Chris Browet e961d92b5e
Allow service data template to return a dict (#57105) 2021-10-23 21:10:30 +02:00