

def create_state_changed_event(self, event_time_fired, entity_id, state):
    'Create state changed event.'
    state = ha.State(state, state).as_dict()
    return ha.Event(EVENT_STATE_CHANGED, {
        'entity_id': entity_id,
        'old_state': state,
        'new_state': state,
    }, time_fired=event_time_fired)

dataset/ETHPy150Open home-assistant/home-assistant/tests/components/test_logbook.py TestComponentHistory.create_state_changed_event/VarMisuse@24/43 `entity_id`->`state`