'Keep alive for I2C-HATs.'

def run(self):

    from raspihats.i2c_hats import ResponseException
    _LOGGER.info(log_message(self, 'starting'))
    while self._run:
        with self._lock:
            for i2c_hat in list(self._i2c_hats.values()):
                try:
                    self._di_scanner.scan(i2c_hat)
                    self._read_status(i2c_hat)
                    if hasattr(i2c_hat, self._EXCEPTION):
                        if (getattr(i2c_hat, self._EXCEPTION) is not None):
                            _LOGGER.warning(log_message(self, i2c_hat, 'online    again'))
                        delattr(i2c_hat, self._EXCEPTION)
                        callbacks = getattr(i2c_hat, self._CALLBACKS)
                        for callback in list(callbacks.values()):
                            callback()
                except ResponseException as ex:
                    if (not hasattr(i2c_hat, self._EXCEPTION)):
                        _LOGGER.error(log_message(self, i2c_hat, ex))
                    setattr(i2c_hat, self._EXCEPTION, ex)
        time.sleep(0.05)
    _LOGGER.info(log_message(self, 'exiting'))
