It is no longer necessary to provide a list of entities to monitor
to the template platforms.
The template is now re-evaluated whenever
a referenced entity changes state, and new entities are automaticlly
discovered.
Automatic analysis can now determine the entities for all templates
without the need for manual setup.
* Make async_track_template_result track multiple templates
Combine template entity updates to only write ha
state once per template group update
* Make async_track_template_result use dataclasses for input/output
* black versions
* naming
* Include the context_entity_id in the logbook api
context_entity_id is the first entity seen during
a time period that includes the context
* update test
* more of them
* include friendly name
* pylint wants a ternary
* Refactor
* performance
* fix homekit context
* Fix self describing events
* Fix external_events
* Convert template lock to use async_track_template_result
* Convert template switch to use async_track_template_result
* Convert template fan to use async_track_template_result
* Convert template binary_sensor to use async_track_template_result
Co-Authored-By: Penny Wood <Swamp-Ig@users.noreply.github.com>
* Convert template cover to use async_track_template_result
* Convert template light to use async_track_template_result
* Convert template vacuum to use async_track_template_result
* Remove unused code from the template integration
Co-authored-by: Penny Wood <Swamp-Ig@users.noreply.github.com>
* Convert template lock to use async_track_template_result
* Convert template switch to use async_track_template_result
* Convert template fan to use async_track_template_result
* Convert template binary_sensor to use async_track_template_result
Co-Authored-By: Penny Wood <Swamp-Ig@users.noreply.github.com>
* Convert template cover to use async_track_template_result
* Convert template light to use async_track_template_result
* Convert template vacuum to use async_track_template_result
Co-authored-by: Penny Wood <Swamp-Ig@users.noreply.github.com>
* Convert template lock to use async_track_template_result
* Convert template switch to use async_track_template_result
* Convert template fan to use async_track_template_result
* Convert template binary_sensor to use async_track_template_result
Co-Authored-By: Penny Wood <Swamp-Ig@users.noreply.github.com>
* Convert template cover to use async_track_template_result
* Convert template light to use async_track_template_result
Co-authored-by: Penny Wood <Swamp-Ig@users.noreply.github.com>
* Convert template lock to use async_track_template_result
* Convert template switch to use async_track_template_result
* Convert template fan to use async_track_template_result
* Convert template alarm_control_panel to use async_track_template_result
* Convert template lock to use async_track_template_result
* Convert template switch to use async_track_template_result
* Convert template fan to use async_track_template_result
* Make sure groups are initialized before template sensors
This way users may use the `expand` function in templates to expand
groups and have HA listen for changes to group members.
Fixes#35872
* Patch async_setup_platform instead of async_setup
* Cleanup
* Use an event to avoid sleep
* Update tests/components/template/test_sensor.py
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
Most of the the template platforms would check for
extract_entities failing to extract entities and avoid
setting up a state change listner for MATCH_ALL after
extract_entities had warned that it could not extract
the entities and updates would need to be done manually.
This protection has been extended to all template platforms.
Alter the behavior of extract_entities to return the
successfully extracted entities if one or more templates
fail extraction instead of returning MATCH_ALL
* Fix typing in component service method
* Add required features to cover service registration
* Fix template cover tilt features
* Delint template cover tests