Commit Graph
778 Commits
Author SHA1 Message Date
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
J. Nick Koston c8f00a7b38 Gather all collection listeners and changes at the same time (#42497) 2020-10-29 10:06:55 +01:00
J. Nick Koston 94219c2266 Ensure the oauth2 token is refreshed before it is expired (#42487)
The current implementation assumed clocks were in sync and did
not account for the time it took to refresh the token.  A 20
second buffer has been added to ensure that the token is refreshed
before it expires as OAuth2Session.valid_token would assume the
token was still good even though the remote would reject it
and would not refresh because it was not time yet.
2020-10-28 07:47:54 -05:00
Paulus Schoutsen e21e28e49f Fix string representation of template result wrappers (#42494) 2020-10-28 09:11:08 +01:00
Paulus Schoutsen d4efa938dd Improve mqtt test (#42490) 2020-10-27 23:22:59 +01:00
Paulus Schoutsen 711b7d4605 Make result wrappers more robust (#42488) 2020-10-27 22:51:58 +01:00
J. Nick Koston 5ca4b4cd0f Set the translations cache under the lock (#42470) 2020-10-27 22:02:38 +01:00
Franck Nijhof 45aba9bdf2 Allow skip parsing template result (#42401) 2020-10-26 16:01:09 +01:00
Paulus Schoutsen bba770b411 Fix CI (#42397) 2020-10-26 13:36:03 +01:00
Paulus Schoutsen e552c9ba96 Store original result on template results (#42391)
* Store original result on template results

* Fix shell command test
2020-10-26 11:30:58 +01:00
J. Nick Koston ce2c388c09 Ensure config entry platforms are excluded from reload (#42367) 2020-10-25 23:53:31 +01:00
Robert SvenssonandMartin Hjelmare e06c8009e1 Add area id to entity registry (#42221)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-24 21:25:28 +02:00
Anders Melchiorsen cb0c937b3e Refresh now() templates on second=0 (#42225) 2020-10-23 00:11:02 +02:00
J. Nick Koston df2ede6522 Fix state overwrite race condition where two platforms request the same entity_id (#42151)
* Fix state overwrite race condition where two platforms request the same entity id

* fix test

* create reservations instead

* revert

* cannot use __slots__ because we patch async_all
2020-10-21 17:01:51 +02:00
Paulus Schoutsen 8d4675713a Fix event test (#42078) 2020-10-19 16:50:46 +02:00
J. Nick KostonandAnders Melchiorsen 31c21126a8 Implement time tracking in templates (#41147)
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
2020-10-19 11:02:43 +02:00
J. Nick Koston 77b95ae8a1 Reduce domain states rate limit to 1 per second (#42004) 2020-10-19 10:18:25 +02:00
J. Nick Koston 3a9b2392f8 Suppress domain and all listeners during template rate limit (#42005) 2020-10-19 10:17:51 +02:00
Paulus Schoutsen 6ab9b7355f Add tests for singleton decorator (#42055) 2020-10-18 22:41:22 +02:00
Philip Allgaier dde6305549 Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
J. Nick Koston 53a1d92f2b Permit event trackers to accept an empty list of entities or domains (#41857) 2020-10-15 09:26:51 +02:00
J. Nick Koston b897ca7260 Ensure all template errors are caught and the websocket api reports them (#41719) 2020-10-12 16:38:24 +02:00
Raman Gupta d3734aae9d Allow custom_serializer to recognize cv.string and cv.boolean to make config schema more reusable (#41532) 2020-10-09 09:36:54 +02:00
J. Nick Koston 5ebf5996f1 Predetermine listener type for script change listeners (#41510) 2020-10-09 08:41:12 +02:00
J. Nick Koston 0b3bea0282 Use async_add_hass_job for debouncer (#41449) 2020-10-09 08:40:36 +02:00
Erik MontnemeryandFabian Affolter 343e5d64b8 Add MQTT integration discovery (#41332)
* Add MQTT integration discovery

* Add script/hassfest/mqtt.py

* Unsubscribe if config entry exists

* Add homeassistant/generated/mqtt.py

* Fix bad loop

* Improve tests

* Improve tests

* Apply suggestions from code review

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>

* Prevent initiating multiple config flows

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2020-10-07 18:30:51 +02:00
Franck NijhofandPaulus Schoutsen ee914366a8 Add native Python types support to templates (#41227)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-07 00:05:52 +02:00
J. Nick Koston 2fabd4edb8 Prevent collecting states already referenced by domain or all (#41308)
The template engine would collect all the states in
a domain or all states while iterating even though
they were already included in all or the domain

This lead to the rate limit not being applied to
templates that iterated all states that also
accessed a collectable property because the engine
incorrectly believed they were specifically
referenced.
2020-10-06 07:25:05 +02:00
J. Nick Koston f50976a0b3 Switch to asyncio.wait for slow update warning implementation (#41184) 2020-10-05 15:28:15 +02:00
Paulus Schoutsen 8ae3f575dd Add extended validation for script repeat/choose (#41265) 2020-10-05 14:03:48 +02:00
Paulus Schoutsen fe2c16dc29 Allow any value when triggering on state attribute (#41261) 2020-10-05 12:53:12 +02:00
J. Nick Koston 51da605b9f Remove manual rate_limit control directive from templates (#41225)
Increase default rate limit for all states and entire
domain states to one minute

Ensure specifically referenced entities are excluded from
the rate limit
2020-10-04 22:40:04 +02:00
Franck Nijhof 38d132addd Fix referenced entity extraction when service call entity contains a template (#41107) 2020-10-03 20:55:59 +02:00
springstan a2c3c33b22 Use core GitHub URL in all files (#41089) 2020-10-03 00:04:11 +02:00
J. Nick Koston b45215f1d2 Implement template rate_limit directive (#40667) 2020-10-01 21:39:44 +02:00
springstan c7ebfdb403 Use single_instance_allowed for webhook config flows (#40965) 2020-10-01 20:44:13 +02:00
J. Nick Koston 7285c7806f Seperate state change tracking from async_track_template_result into async_track_state_change_filtered (#40803) 2020-10-01 10:19:20 +02:00
J. Nick KostonandPaulus Schoutsen 9ccebdb8d5 Refactor group to extend domains that can be grouped (#40607)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-30 09:13:53 -05:00
J. Nick KostonandPaulus Schoutsen e564af0b5b Improve performance of accessing template state (#40323)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-28 10:35:12 -05:00
J. Nick Koston e08ee282ab Abort execution of template renders that overwhelm the system (#40647) 2020-09-28 14:43:22 +02:00
J. Nick KostonandPaulus Schoutsen 57b7559832 Ensure all jinja2 errors are trapped and displayed in the developer tools (#40624)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-26 17:03:32 -05:00
J. Nick Koston 3261a904da Reduce the number of template re-renders when we are only counting states (#40272) 2020-09-26 16:29:49 -05:00