'Run the process to export the data.'

def run(self):

    while True:
        event = self._queue.get()
        if (event == self._quit_object):
            _LOGGER.debug('Event    processing    thread    stopped')
            self._queue.task_done()
            return
        elif ((event.event_type == EVENT_STATE_CHANGED) and event.data.get('new_state')):
            _LOGGER.debug('Processing    STATE_CHANGED    event    for    %s', event.data['entity_id'])
            try:
                self._report_attributes(event.data['entity_id'], event.data['new_state'])
            except Exception:
                _LOGGER.exception('Failed    to    process    STATE_CHANGED    event')
        else:
            _LOGGER.warning('Processing    unexpected    event    type    %s', event.event_type)
        self._queue.task_done()
