'Initialize HomeMatic hub.'

def __init__(self, hass, name, use_variables):

    self.hass = hass
    self.entity_id = '{}.{}'.format(DOMAIN, name.lower())
    self._homematic = hass.data[DATA_HOMEMATIC]
    self._variables = {}
    self._name = name
    self._state = STATE_UNKNOWN
    self._use_variables = use_variables
    track_time_interval(hass, self._update_hub, SCAN_INTERVAL_HUB)
    self._update_hub(None)
    if self._use_variables:
        track_time_interval(hass, self._update_variables, SCAN_INTERVAL_VARIABLES)
        self._update_variables(None)
