Commit graph

141 commits

Author SHA1 Message Date
Franck Nijhof
06a35fb7db
Code styling tweaks to core helpers () 2023-01-08 13:44:09 -10:00
Franck Nijhof
d4f69a3652
String formatting and max line length - Part 7 ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-12-27 11:18:56 +01:00
Marc Mueller
63d519c1a8
Spelling updates () 2022-11-28 16:51:43 +01:00
Aarni Koskela
8038485ca4
Use partition instead of split where possible in core () 2022-11-15 21:45:48 +01:00
Erik Montnemery
18033532ca
Fix search throwing on templated services () 2022-10-05 10:59:18 +03:00
epenet
8300f8234c
Make async_extract_entities generic () 2022-09-16 00:20:47 +02:00
J. Nick Koston
61cc9f5288
Consolidate executor jobs when loading integration manifests () 2022-07-14 13:06:08 -07:00
Paulus Schoutsen
d59258bd25
Revert "Add service entity context ()" () 2022-05-27 10:30:40 -07:00
Franck Nijhof
69cc6ab5f1
Clean up accessing entity_registry.async_get_registry helper via hass () 2022-05-17 16:40:45 +02:00
Paulus Schoutsen
64636a4310
Add service entity context ()
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-05-09 14:45:53 -07:00
Joakim Plate
2dbe910e31
Adjust warning for missing entites () 2022-05-09 12:37:24 +02:00
Erik Montnemery
eb068bc850
Fix targeting all or none entities in service calls ()
* Fix targeting all or none entities in service calls

* Add test
2022-03-22 19:45:27 +02:00
Paulus Schoutsen
8bbbd1947d
Raise if referenced entity does not support service () 2022-03-20 16:01:58 -07:00
Erik Montnemery
34eb4aa2d0
Exclude hidden entities from targets () 2022-03-15 08:42:22 -07:00
Erik Montnemery
cd25769667
Rename async_resolve_entity_ids to async_validate_entity_ids () 2022-03-04 09:51:53 +01:00
Marc Mueller
bfb1abd3a2
Add type ignore error codes [helpers] () 2022-02-18 11:31:37 +01:00
epenet
3a09090a4b
Drop use of deprecated ENTITY_CATEGORIES ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-24 13:36:42 +01:00
Erik Montnemery
fc2025509e
Teach call service script action about entity registry ids () 2022-01-07 08:42:47 -08:00
epenet
9971831b51
Improve typing in core service registration ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-30 21:18:10 +01:00
Tobias Sauerwein
2c904c0974
Bump mypy to 0.930 ()
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 () 2021-12-23 11:14:47 -08:00
Erik Montnemery
a0a8b9db26
Add entity category 'system' ()
* Add entity category 'hidden'

* Update cloud

* Update Google assistant

* Update Alexa

* Fix tests

* Add ENTITY_CATEGORIES constant

* Rename ENTITY_CATEGORY_HIDDEN to ENTITY_CATEGORY_SYSTEM

* Correct import in motioneye
2021-10-28 14:36:41 +02:00
Chris Browet
e961d92b5e
Allow service data template to return a dict () 2021-10-23 21:10:30 +02:00
Marc Mueller
238b488642
Use assignment expressions 03 () 2021-10-17 20:08:11 +02:00
Erik Montnemery
2b37943355
Don't add indirectly referenced config entities to service calls () 2021-10-15 08:46:43 -07:00
Marc Mueller
77ee72cbb9
Import Callable from collections.abc (1) () 2021-09-29 16:32:11 +02:00
Marc Mueller
f6b162bc39
Add pylint CodeStyle extension () 2021-07-19 06:57:06 -07:00
Erik Montnemery
abd6f739e8
Pylint fix () 2021-05-25 10:53:18 -07:00
Erik Montnemery
7b5e63132c
Prevent parallel reload of automations () 2021-05-25 08:50:50 -07:00
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors () 2021-05-20 18:53:29 +03:00
Marc Mueller
c07646db5d
Update typing syntax ()
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Tobias Sauerwein
9d4ad1821e
Fix logic of entity id extraction ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-14 14:12:26 +02:00
Franck Nijhof
4e3c12883e
Allow templatable service target to support scripts () 2021-04-01 13:10:01 -07:00
Franck Nijhof
38d14702fa
Remove HomeAssistantType alias from helpers () 2021-03-27 12:55:24 +01:00
Marc Mueller
4cb7718192
Update typing 16 () 2021-03-18 22:58:19 +01:00
J. Nick Koston
08db262972
Add a service to reload config entries that can easily be called though automations () 2021-03-17 21:27:21 -07:00
Marc Mueller
6fb2e63e49
Update typing 02 () 2021-03-17 18:34:19 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups ()
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Franck Nijhof
42fd3be0e8
Add template support to service targets ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-23 22:46:00 -08:00
Bram Kragten
afa91e886b
Add description to tts and notify services ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-02-23 14:29:57 +01:00
Franck Nijhof
c8ffac20b9
Add name to services () 2021-02-22 16:26:46 +01:00
Anders Melchiorsen
9f4874bb81
Explicitly create_task for asyncio.wait () 2021-02-20 19:57:46 +01:00
Bram Kragten
6986fa4eb6
Add target to services.yaml ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-02-16 09:35:27 +01:00
Franck Nijhof
9b7c39d20b
Postponed evaluation of annotations in core ()
* Postponed evaluation of annotations in core

* Remove unneeded future
2021-02-12 10:58:20 +01:00
Ville Skyttä
a6358430b4
Fix deprecated asyncio.wait use with coroutines ()
https://docs.python.org/3/library/asyncio-task.html#asyncio-example-wait-coroutine
2021-02-10 14:16:58 +01:00
Bram Kragten
4b493c5ab9
Add target to service call API ()
* Add target to service call API

* Fix _async_call_service_step

* CONF_SERVICE_ENTITY_ID overrules target

* Move merging up before processing schema

* Restore services.yaml

* Add test
2021-02-10 12:42:28 +01:00
tkdrob
c2302784c2
Use core constants for helpers () 2021-02-08 22:53:17 +01:00
Ville Skyttä
82607977ef
Various type hint improvements () 2021-02-08 11:59:46 +01:00
Ville Skyttä
1c8fbc7e6a
Upgrade codespell to 2.0.0 ()
* Upgrade codespell to 2.0.0

* Fix newly found spelling errors
2020-12-31 19:14:07 +01:00
Paulus Schoutsen
cf5be049b3
Warn when referencing missing devices/areas () 2020-12-01 08:01:27 +01:00