Commit Graph
1495 Commits
Author SHA1 Message Date
Paulus Schoutsen 557ec374f1 Convert discovery helper to use dispatcher (#47008) 2021-02-24 13:37:31 -08:00
Joakim Sørensen 11a89bc3ac Add addon selector (#46789) 2021-02-24 17:02:48 +01:00
Franck NijhofandPaulus Schoutsen 42fd3be0e8 Add template support to service targets (#46977)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-23 22:46:00 -08:00
afa91e886b Add description to tts and notify services (#46764)
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 (#46905) 2021-02-22 16:26:46 +01:00
Anders Melchiorsen d61d39de08 Handle ConditionError with multiple entity_id for state/numeric_state (#46855) 2021-02-22 08:11:59 +01:00
Anders Melchiorsen d33a1a5ff8 Refine printing of ConditionError (#46838)
* Refine printing of ConditionError

* Improve coverage

* name -> type
2021-02-21 14:54:36 +01:00
Erik Montnemery 5e26bda52d Add support for disabling config entries (#46779) 2021-02-20 19:21:39 -08:00
Erik MontnemeryandDonnie 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
Anders Melchiorsen 9f4874bb81 Explicitly create_task for asyncio.wait (#46325) 2021-02-20 19:57:46 +01:00
Erik Montnemery 54cf954353 Add device_entities template function/filter (#46406) 2021-02-19 21:50:59 -08:00
J. Nick KostonandPaulus Schoutsen bb7e4d7daa Implement suggested_area in the device registry (#45940)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-19 19:34:33 -10:00
Anders Melchiorsen bfea7d0baa Raise ConditionError for and/or/not errors (#46767) 2021-02-19 13:15:30 +01:00
Anders Melchiorsen e7e3e09063 Raise ConditionError for zone errors (#46253)
* Raise ConditionError for zone errors

* Do not test missing state

* Handle multiple entities/zones
2021-02-19 13:14:47 +01:00
Bram KragtenandFranck Nijhof 6986fa4eb6 Add target to services.yaml (#46410)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-02-16 09:35:27 +01:00
J. Nick Koston aa061e5818 Fix variable name from script refactoring (#46503) 2021-02-14 10:52:18 -10:00
J. Nick Koston c9df42b69a Add support for pre-filtering events to the event bus (#46371) 2021-02-14 09:42:55 -10:00
Erik Montnemery f1714dd541 Make some Area and EntityRegistry member functions callbacks (#46433) 2021-02-12 17:00:35 +01:00
Franck Nijhof 9b7c39d20b Postponed evaluation of annotations in core (#46434)
* Postponed evaluation of annotations in core

* Remove unneeded future
2021-02-12 10:58:20 +01:00
Erik Montnemery ed31cc363b Wait for registries to load at startup (#46265)
* Wait for registries to load at startup

* Don't decorate new functions with @bind_hass

* Fix typing errors in zwave_js

* Load registries in async_test_home_assistant

* Tweak

* Typo

* Tweak

* Explicitly silence mypy errors

* Fix tests

* Fix more tests

* Fix test

* Improve docstring

* Wait for registries to load
2021-02-11 17:36:19 +01:00
Anders Melchiorsen 888c9e120d Raise ConditionError for time errors (#46250) 2021-02-11 17:29:17 +01:00
Anders Melchiorsen 1f5fb8f28a Raise ConditionError for template errors (#46245) 2021-02-11 10:30:09 +01:00
Paulus Schoutsen 538df17a28 Restore Google/Alexa extra significant change checks (#46335) 2021-02-10 16:30:29 +01:00
Franck Nijhof 22389043eb Remove base_url fallback (#46316) 2021-02-10 14:31:11 +01:00
Ville Skyttä a6358430b4 Fix deprecated asyncio.wait use with coroutines (#44981)
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 (#45898)
* 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
Erik Montnemery 78b7fbf7b1 Fix race in EntityRegistry.async_device_modified (#46319) 2021-02-10 10:50:44 +01:00
Anders Melchiorsen f27066e773 Raise ConditionError for state errors (#46244) 2021-02-09 09:46:36 +01:00
tkdrob c2302784c2 Use core constants for helpers (#46240) 2021-02-08 22:53:17 +01:00
Erik Montnemery 0780e52ca4 Support templates in event triggers (#46207)
* Support templates in event triggers

* Don't validate trigger schemas twice
2021-02-08 14:06:27 +01:00
eaa2d371a7 Add select selector for blueprints (#45803)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-08 14:03:26 +01:00
Ville Skyttä 82607977ef Various type hint improvements (#46144) 2021-02-08 11:59:46 +01:00
Erik Montnemery 047f16772f Support templating MQTT triggers (#45614)
* Add support for limited templates (no HASS access)

* Pass variables to automation triggers

* Support templates in MQTT triggers

* Spelling

* Handle trigger referenced by variables

* Raise on unsupported function in limited templates

* Validate MQTT trigger schema in MQTT device trigger

* Add trigger_variables to automation config schema

* Don't print stacktrace when setting up trigger throws

* Make pylint happy

* Add trigger_variables to variables

* Add debug prints, document limited template

* Add tests

* Validate MQTT trigger topic early when possible

* Improve valid_subscribe_topic_template
2021-02-08 10:50:38 +01:00
Anders Melchiorsen b9b1caf4d7 Raise ConditionError for numeric_state errors (#45923) 2021-02-08 10:47:57 +01:00
Paulus SchoutsenandErik 9e07910ab0 Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Erik Montnemery 8a7e0241ab Fix race in script wait for trigger step (#46055)
* Fix race in script wait for trigger step

* Update script.py

* Update script.py
2021-02-06 10:01:30 +01:00
Joakim Sørensen 90973f471f Add integration name to the deprecation warnings (#45901) 2021-02-03 14:40:11 +01:00
d13b58a4e6 Upgrade mypy to 0.800 (#45485)
* Upgrade mypy to 0.800

https://mypy-lang.blogspot.com/2021/01/mypy-0800-released.html

* Fix issues flagged by mypy 0.800

* Add overloads + small changes

* Apply grammar

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-30 22:33:53 +01:00
84f506efb7 Set default position value for cover action (#45670)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-29 21:11:12 +01:00
Marc Mueller 7673f57248 Add additional error handling for automation script run (#45613) 2021-01-28 09:26:41 +01:00
J. Nick Koston a1662b3bb9 Restore the device id after deleting and re-adding an integration (#45348) 2021-01-27 17:10:57 +01:00
CtrlZvi 1433cdaa12 Prefer shorter keys for intent matching (#43672)
When using fuzzy matching to match entity names for intents, whichever
entity is first is preferred in the case of equal matches. This leads
to situations where entities with similar names (such as entities named
for their area and then specific area location) may be used when the
whole area is wanted.

I ran into this with the my Phillips Hue lights. I have each individual
light named such that its room is the first part of the name, and its
location within the room after. So my living room has:
Living Room West
Living Room Northwest
Living Room North
Living Room Northeast

I then have a group for the whole room:
Living Room

Because the group is the last of the entities, trying to adjust the
whole room only activates one light, because all of the lights match
equally well.

By preferring the shortest of equal matches, we prefer keys that have
the least amount of extra information, causing "Living Room" to match
the group instead of an individual light.
2021-01-27 12:16:19 +01:00
Thomas LovénandPaulus Schoutsen 06ade6129c Add selectors for text and arbitrary objects (#45112)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-27 09:20:19 +01:00
Paulus Schoutsen 352d0870e3 Light significant changes + sensor tweaks (#45583) 2021-01-26 22:11:06 +01:00
Joakim SørensenandPaulus Schoutsen b1c2cde40b Changes to filename and path validation (#45529)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-26 15:53:21 +01:00
Paulus Schoutsen d082be787f Add "significant change" base (#45555) 2021-01-26 14:13:27 +01:00
Philip Allgaier 89fc92f68a Slightly improve error message in case of duplicate entity IDs (#45424) 2021-01-22 09:16:13 -05:00
Shay Levy f117ddc6fa Stop update_coordinator schedule refresh when HA is stopping (#45338)
* Stop update_coordinator schedule refresh when HA is stopping

* Add unittests

* Fix event type
2021-01-22 00:23:50 +01:00
J. Nick Koston a7741be9bb Wait for all triggers when one fails to attach (#45361) 2021-01-20 22:13:21 +01:00
Ville Skyttä 94dbcc9d2b Generics and other type hint improvements (#45250) 2021-01-18 22:23:25 +01:00