def setup(hass, config):
    entities = set()

    for key in extract_domain_configs(config, DOMAIN):
        entries = config[key]
        if not isinstance(entries, list):
            entries = entries,

        for entry in entries:
            name = entry.get(CONF_NAME, DEFAULT_NAME)
            latitude = convert(entry.get(ATTR_LATITUDE), float)
            longitude = convert(entry.get(ATTR_LONGITUDE), float)
            radius = convert(entry.get(ATTR_RADIUS, DEFAULT_RADIUS), float)
            icon = entry.get(ATTR_ICON)
            passive = entry.get(ATTR_PASSIVE, DEFAULT_PASSIVE)

            if None in (latitude, longitude):
                logging.getLogger(__name__).error(
                    'Each zone needs a latitude and longitude.')
                continue

            zone = Zone(hass, name, latitude, longitude, radius, icon, 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
This needs to be implemented at the user level.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/zone.py/setup--crossover with--dataset/ETHPy150Open toastdriven/piecrust/piecrust/resources.py/Resource.get_resource_uri