Add and restore context in recorder (#15859)
This commit is contained in:
1 parent
da916d7b27
commit
9512bb9587
7 files changed
+73
-14
No files matched your search
+1
-1
@@ -266,7 +266,7 @@ def mock_state_change_event(hass, new_state, old_state=None):
|
||||
if old_state:
|
||||
event_data['old_state'] = old_state
|
||||
|
||||
hass.bus.fire(EVENT_STATE_CHANGED, event_data)
|
||||
hass.bus.fire(EVENT_STATE_CHANGED, event_data, context=new_state.context)
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
|
||||
Reference in new issue
Block a user