def setup(hass, config):
    """Setup zone."""
    entities = set()
    for _, entry in config_per_platform(config, DOMAIN):
        name = entry.get(CONF_NAME)
        zone = Zone(hass, name, entry[CONF_LATITUDE], entry[CONF_LONGITUDE],
                    entry.get(CONF_RADIUS), entry.get(CONF_ICON),
                    entry.get(CONF_PASSIVE))
        zone.entity_id = generate_entity_id(ENTITY_ID_FORMAT, name, entities)
        zone.update_ha_state()
        entities.add(zone.entity_id)

    if ENTITY_ID_HOME not in entities:
        zone = Zone(hass, hass.config.location_name,
                    hass.config.latitude, hass.config.longitude,
                    DEFAULT_RADIUS, ICON_HOME, False)
        zone.entity_id = ENTITY_ID_HOME
        zone.update_ha_state()

    return True