Tune logbook performance to accomodate recent changes (#39348)

This commit is contained in:
J. Nick Koston 2020-08-30 02:20:31 -05:00 committed by GitHub
parent ad0d3b4848
commit dda4cf4d58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 17 deletions

View file

@ -2084,6 +2084,16 @@ async def test_logbook_context_from_template(hass, hass_client):
class MockLazyEventPartialState(ha.Event):
"""Minimal mock of a Lazy event."""
@property
def data_entity_id(self):
"""Lookup entity id."""
return self.data.get(ATTR_ENTITY_ID)
@property
def data_domain(self):
"""Lookup domain."""
return self.data.get(ATTR_DOMAIN)
@property
def time_fired_minute(self):
"""Minute the event was fired."""