def __init__(self, client_id, client_secret, username, password, host, host_password):
    'Initialize the data.'
    import smappy
    self._remote_active = False
    self._local_active = False
    if (client_id is not None):
        try:
            self._smappy = smappy.Smappee(client_id, client_secret)
            self._smappy.authenticate(username, password)
            self._remote_active = True
        except RequestException as error:
            self._smappy = None
            _LOGGER.exception('Smappee server authentication failed (%s)', error)
    else:
        _LOGGER.warning('Smappee server component init skipped.')
    if (host is not None):
        try:
            self._localsmappy = smappy.LocalSmappee(host)
            self._localsmappy.logon(host_password)
            self._local_active = True
        except RequestException as error:
            self._localsmappy = None
            _LOGGER.exception('Local Smappee device authentication failed (%s)', error)
    else:
        _LOGGER.warning('Smappee local component init skipped.')
    self.locations = {}
    self.info = {}
    self.consumption = {}
    self.sensor_consumption = {}
    self.instantaneous = {}
    if (self._remote_active or self._local_active):
        self.update()
Initialize the data.
def __init__(self, client_id, client_secret, username, password, host, host_password):
    
    import smappy
    self._remote_active = False
    self._local_active = False
    if (client_id is not None):
        try:
            self._smappy = smappy.Smappee(client_id, client_secret)
            self._smappy.authenticate(username, password)
            self._remote_active = True
        except RequestException as error:
            self._smappy = None
            _LOGGER.exception('Smappee server authentication failed (%s)', error)
    else:
        _LOGGER.warning('Smappee server component init skipped.')
    if (host is not None):
        try:
            self._localsmappy = smappy.LocalSmappee(host)
            self._localsmappy.logon(host_password)
            self._local_active = True
        except RequestException as error:
            self._localsmappy = None
            _LOGGER.exception('Local Smappee device authentication failed (%s)', error)
    else:
        _LOGGER.warning('Smappee local component init skipped.')
    self.locations = {}
    self.info = {}
    self.consumption = {}
    self.sensor_consumption = {}
    self.instantaneous = {}
    if (self._remote_active or self._local_active):
        self.update()