* Make input_datetime better handle timezones
* Improve test coverage
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Revert change to time format
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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
Since most of the json serialize work for the websocket was done
multiple times for the same message, we can avoid the overhead
of serializing the same message many times (once per websocket
client) with a cache.
* Merge original changes from #23590
* guard
* adjust
* adjust
* adjust
* Update async_render_to_info for recent codebase changes
* no more protected access
* do not fire right away per review comments
* update test to not fire right away
* closer
* rework tests for non firing first
* augment coverage
* remove cruft
* test for complex listen add/remove
* update docs to match review feedback to not fire right away
* preserve existing behavior
* fix test
* Ensure listeners are cleaned up
* de-dupe and comment
* de-dupe and comment
* coverage
* test to login again if we go from exception to ok to exception
* Update homeassistant/core.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/helpers/event.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* rename _boolean_coerce to result_as_boolean and move it out of event
* additional coverage
* Add more tests (may still be able to trim this down)
Co-authored-by: Swamp-Ig <github@ninjateaparty.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Pre calc domain when an entity id created to avoid
having to call the property method which had to call
split_entity_id every time. If there are a lot of
zone related automations, async_active_zone can call
async_entity_ids frequently which results in 100000s
of split_entity_id via the domain property every
second.
Every second we were calling the getrandom() syscall to generate a uuid4
for a context that will never be looked:
* In most setups there are no more time_changed listeners
* The ones that do exist never care about context
* time_changed events are never saved in the database
* Detect lingering threads after tests
* Make sure cast is setup before checking state
* Make sure we ask executors of old hass to shutdown
We are not waiting here, just hoping for the best
* Make sure all instances of hass and executors is stopped.
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Also apply hass stopping to scripts
* Adjust to changes how we set up executor
* Add new CoreState.stopped
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Fix exceptions.Unauthorized.permission type
* Use auth.permission consts more
* Auth typing improvements
* Helpers typing improvements
* Calculate self.state only once
* Part 1 of 2 (no breaking changes in part 1).
When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.
This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.
Frontend Changes (home-assistant/frontend#6068)
* Address review comments
* bump timeout to 1800s, adjust comment
* bump timeout to 4h
* remove timeout failsafe
* and the test