* Verify and case
* Review comments
* Update homeassistant/helpers/event.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/helpers/event.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Reduce time to reload yaml and check configuration
We spend a significant amount of time compiling templates
that we have already compiled.
Use an LRU cache to avoid re-compiling templates that
we frequently use.
* pylint
* switch to WeakValueDictionary
* preen
* fix error when unique id is re-used
* add test for the logging
* Update homeassistant/helpers/entity_platform.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/helpers/entity_platform.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use event loop scheduling for tracking time patterns
* make patching of time targetable
* patch time tests since time can tick to match during the test
* fix more tests
* time can only move forward
* time can only move forward
* back to 100% coverage
* simplify since the event loop time cannot move backwards
* simplify some more
* revert simplify
* Revert "revert simplify"
This reverts commit bd42f232f6.
* Revert "simplify some more"
This reverts commit 2a6c57d514.
* Revert "simplify since the event loop time cannot move backwards"
This reverts commit 3b13714ef4.
* Attempt another simplify
* time does not move backwards in the last two
* remove next_time <= now check
* fix previous merge error