Commit Graph
669 Commits
Author SHA1 Message Date
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
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
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 KostonandPaulus Schoutsen 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 KragtenandPaulus Schoutsen 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
Paulus Schoutsen 0de9e8e952 Allow specifying device_id as target (#43767) 2020-11-30 14:27:02 +01:00
Paulus Schoutsen dd513147a5 Add a service target (#43725) 2020-11-28 23:33:32 +01:00
Erik Montnemery a5e5c5c7e6 Exclude disabled entities from async_entries_for_device (#43665) 2020-11-27 09:03:44 +01:00
Paulus Schoutsen f9fa24950b OAuth2 to use current request header (#43668) 2020-11-27 08:55:34 +01:00
Paulus Schoutsen e1de36fda8 Fix check config (#43663) 2020-11-26 22:25:21 +01:00
Erik Montnemery dc8364fd3a Support disabling devices (#43293) 2020-11-26 16:45:02 +01:00
Bram KragtenandPaulus Schoutsen 4aa181416c Add area selector, remove date selector (#43658)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-26 15:44:25 +01:00
Bram Kragten 3767af14f3 Add more selectors (#43639) 2020-11-25 20:03:56 +01:00
Paulus Schoutsen 1de2554f70 Tweak template digit detection (#43621) 2020-11-25 16:10:33 +01:00
Paulus SchoutsenandBram Kragten b3be708db6 Add default config if not there (#43321)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-11-25 15:10:04 +01:00
Paulus Schoutsen 390668e192 Check config to use config platforms (#43407) 2020-11-19 22:05:36 +01:00
Bram Kragten 5dcbb634f6 Fix selector to return the selector type (#43395) 2020-11-19 16:48:43 +01:00
Paulus Schoutsen bae026a6fe Add support for selectors in services.yaml (#43162)
* Add support for selectors in services.yaml

* Add base schema validation
2020-11-13 22:53:55 +01:00
Paulus Schoutsen 0a717f313e Improve entity domain validator (#43164) 2020-11-13 13:31:43 +01:00
Paulus Schoutsen 8dbd54bed1 Disable parsing scientific/complex number notation in template type (#43170) 2020-11-13 13:22:29 +01:00
Erik Montnemery 8a7febcfbe Improve restore of deleted devices (#42703)
* Improve restore of deleted devices

* Simplify
2020-11-10 22:14:39 +01:00
J. Nick Koston c7f35b20fb Make all translations cacheable (#42892) 2020-11-09 22:36:45 +01:00
Paulus Schoutsen aec191b558 Support datetime sensor in time trigger (#42899) 2020-11-09 14:50:54 +01:00
Anders Melchiorsen 650c57db5b Fix async_track_utc_time_change firing too early (#42176) 2020-11-05 16:34:56 +01:00
0fb587727c Add initial blueprint support (#42469)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-11-02 15:00:13 +01:00
Paulus Schoutsen 1844e30858 Add support for manual updating a data coordinator (#42746) 2020-11-02 09:54:08 +01:00
J. Nick Koston 2bbd2a6e70 Reduce complexity of storage writes (#42576)
* Reduce complexity of storage writes

* add test

* stop hass

* workaround bad test
2020-10-29 22:35:51 -05:00
J. Nick Koston 7f1683c731 Remove legacy template extract_entities (#42601) 2020-10-30 00:06:08 +01:00
J. Nick Koston 8eb89cdb46 Fix flapping event template test (#42614) 2020-10-30 00:05:55 +01:00