* Ensure service calls are typed [k-n]
* Ensure service calls are typed in mazda
* Adjust mazda
* Add mazda comment
Co-authored-by: epenet <epenet@users.noreply.github.com>
* Use parent_id to find cause of events with new contexts
When looking up the causing event for logbook display, use the `parent_id`
of the current context if the current context just points back to the
current event.
This now shows in the logbook the cause of an event in the case that a
component has created a new context from an existing context and tied
them together via the `Context.parent_id`.
* Fix exception when parent event not available
* Use async_Log_entry to avoid jump into executor
* Provide a logbook option entity_matches_only to optimize for single entity id lookup
When entity_matches_only is provided, contexts and events that do not
contain the entity_id are not included in the logbook response.
* Update homeassistant/components/logbook/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* api only takes a single entity
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* 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
* Remove support for legacy logbook events created before 0.112
Reduce the complexity of the logbook code. This
should also have a small performance boost.
* None is the default
* Move logbook continuous domain filtering to sql
sensors tend to generate a significant amount of states
that are filtered out by logbook. In testing 75% of
states can be filtered away in sql to avoid the
sqlalchemy ORM overhead of creating objects that will
be discarded.
* remove un-needed nesting
* Added GLOB capability to entityfilter and every place that uses it. All existing tests are passing
* added tests for components affected by glob change
* fixed flake8 error
* mocking the correct listener
* mocking correct bus method in azure test
* tests passing in 3.7 and 3.8
* fixed formatting issue from rebase/conflict
* Checking against glob patterns in more performant way
* perf improvments and reverted unnecessarily adjusted tests
* added new benchmark test around filters
* no longer using get with default in entityfilter
* changed filter name and removed logbook from filter benchmark
* simplified benchmark tests from feedback
* fixed apache tests and returned include exclude schemas to normal
* fixed azure event hub tests to properly go through component logic
* fixed azure test and clean up for other tests
* renaming test files to match standard
* merged mqtt statestream test changes with base
* removed dependency on recorder filter schema from history
* fixed recorder tests after merge and a bunch of lint errors
* adj
* time_fired_isoformat
* remove unused code
* tests for processing timestamps
* restore missing import lost in merge conflict
* test for None case
* Prefilter more logbook events in sql
Prefilter sensor events in _keep_event before humanify
Cache static attribute lookup
Reduces logbook execution time by ~35%
* fix mocking in benchmark
* Update tests for logbook users
* Add old_state_id to states, remove old/new state data from events since it can now be found by a join
* remove state lookup on restart
* Ensure old_state is set for exisitng states