1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-22 20:09:35 +00:00
Commit Graph

1993 Commits

Author SHA1 Message Date
Joakim Sørensen
11a89bc3ac Add addon selector (#46789) 2021-02-24 17:02:48 +01:00
Franck Nijhof
42fd3be0e8 Add template support to service targets (#46977)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-23 22:46:00 -08: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 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
Erik Montnemery
54cf954353 Add device_entities template function/filter (#46406) 2021-02-19 21:50:59 -08:00
J. Nick Koston
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
Erik Montnemery
f1714dd541 Make some Area and EntityRegistry member functions callbacks (#46433) 2021-02-12 17:00:35 +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
Erik Montnemery
bfd5a62bad Fix typo (#46321) 2021-02-10 11:31:51 +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
Erik Montnemery
58b4a91a5b Test that variables are passed to wait_for_trigger script action (#46221) 2021-02-09 00:34:18 +01:00
Anders Melchiorsen
48002f47f4 Use caplog fixture for log capturing (#46214) 2021-02-08 14:33:57 +01:00
Matteo Agnoletto
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
Anders Melchiorsen
b9b1caf4d7 Raise ConditionError for numeric_state errors (#45923) 2021-02-08 10:47:57 +01:00
Paulus Schoutsen
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
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én
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
Joakim Sørensen
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
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
243014bff1 Fix test_wait_template_with_utcnow (#45356) 2021-01-20 23:56:00 +01:00
J. Nick Koston
a7741be9bb Wait for all triggers when one fails to attach (#45361) 2021-01-20 22:13:21 +01:00
J. Nick Koston
da677f7d5a Add support for discovery via DHCP (#45087)
* Add support for discovery via DHCP

* additional tesla ouis

* merge tests

* dhcp test

* merge requirements test

* dhcp test

* dhcp discovery

* dhcp discovery

* pylint

* pylint

* pylint

* fix

* Add matching tests

* 100% cover

* cleanup

* fix codespell

* Update exception handling

* remove unneeded comment

* fix options handling exception

* fix options handling exception
2021-01-14 09:09:08 +01:00
Paulus Schoutsen
e83ced6737 Add name to ignored entries (#45051)
* Add name to ignored entries

* Fix test
2021-01-12 09:26:20 +01:00
J. Nick Koston
7c93a11aba Fix wait_template incorrectly matching falsey values (#44938) 2021-01-08 13:07:50 +01:00
Ville Skyttä
2fb3be50ab Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None

* Remove unnecessary async_get_device connections arg usages

Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
J. Nick Koston
2ef25e7414 Fix script wait templates with now/utcnow (#44717) 2021-01-01 13:03:34 +01:00
Allen Porter
eb07282e9b Add debug logging for failed OAuth token refreshes to help users diagnose (#44637) 2020-12-30 10:03:27 +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
J. Nick Koston
dd0afc3b66 Create httpx helper to wrap a shared httpx.AsyncClient (#43877)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-12-09 17:18:57 +01:00
Paulus Schoutsen
ac2af69d26 Fix extracting entity and device IDs from scripts (#44048)
* Fix extracting entity and device IDs from scripts

* Fix extracting from data_template
2020-12-08 13:06:29 +01:00
Erik Montnemery
30baf333c3 Improve handling of disabled devices (#43864) 2020-12-02 21:20:14 +01:00
Chris Talkington
891edec73b Add test for is_internal_request (#43841) 2020-12-02 10:12:48 +01:00
Bram Kragten
d93687b5ac Update area and target selectors add sequence selector (#43831)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-12-02 09:30:49 +01:00
Paulus Schoutsen
1c9c99571e Use !input instead of !placeholder (#43820)
* Use !input instead of !placeholder

* Update input name

* Lint

* Move tests around
2020-12-01 18:21:36 +01:00
Franck Nijhof
b1c11eaaf8 Fix config validation tests for upcoming beta (#43811) 2020-12-01 17:07:28 +01:00
Paulus Schoutsen
69710cb664 Base area IDs on initial name (#43804) 2020-12-01 12:45:56 +01:00
Paulus Schoutsen
cf5be049b3 Warn when referencing missing devices/areas (#43787) 2020-12-01 08:01:27 +01:00
Paulus Schoutsen
a5c79a1f84 Add support for device class in target selector (#43768) 2020-11-30 23:35:24 +01:00