* Use loop time to set context
loop time is faster than utcnow, and since its only used internally it can
be switched without a breaking change
* fix mocking
* Allow specifying a custom log function for template render
* Bypass template cache when reporting errors + fix tests
* Send errors as events
* Fix logic for creating new TemplateEnvironment
* Add strict mode back
* Only send error events if report_errors is True
* Force test of websocket_api only
* Debug test
* Run pytest with higher verbosity
* Timeout after 1 minute, enable syslog output
* Adjust timeout
* Add debug logs
* Fix unsafe call to WebSocketHandler._send_message
* Remove debug code
* Improve test coverage
* Revert accidental change
* Include severity in error events
* Remove redundant information from error events
* Move template update coordinator to its own file
* Add coordinator.py to .coveragerc
* Remove coordinator.py to .coveragerc
* Apply suggestions from code review
* Update homeassistant/components/template/coordinator.py
* Copy over fixes from upstream
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Show OTA update progress
* Use an event listener instead of a dispatcher
* Add tests
* Fix name
* Improve tests coverage
* Fix subscribe/unsubscribe logic
* Use async_on_remove()
* Fix memory leak in dispatcher removal
When we removed the last job/callable from the dict for the
signal we did not remove the dict for the signal which meant
it leaked
* comment
* cleanup a bit more
Fix mobile app thundering heard
The mobile_app would setup a dispatcher to listener for updates on
every entity and reject the ones that were not for the unique id
that it was intrested in.
Instead we now register for a signal per unique id since we were
previously generating O(entities*sensors*devices) callbacks which
was causing the event loop to stall when there were a large
number of mobile app users.
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* fix json
* cover