def setup_proximity_component(hass, name, config):
 ignored_zones = config.get(CONF_IGNORED_ZONES)
 proximity_devices = config.get(CONF_DEVICES)
 tolerance = config.get(CONF_TOLERANCE)
 proximity_zone = name
 unit_of_measurement = config.get(CONF_UNIT_OF_MEASUREMENT, hass.config.units.length_unit)
 zone_id = 'zone.{}'.format(proximity_zone)
 proximity = Proximity(hass, proximity_zone, DEFAULT_DIST_TO_ZONE, DEFAULT_DIR_OF_TRAVEL, DEFAULT_NEAREST, ignored_zones, proximity_devices, tolerance, zone_id, unit_of_measurement)
 proximity.entity_id = '{}.{}'.format(DOMAIN, proximity_zone)
 proximity.update_ha_state()
 track_state_change(hass, proximity_devices, proximity.check_proximity_state_change)
 return True

def setup_proximity_component ( hass , name , config ) : ignored_zones = config . get ( CONF_IGNORED_ZONES ) proximity_devices = config . get ( CONF_DEVICES ) tolerance = config . get ( CONF_TOLERANCE ) proximity_zone = name unit_of_measurement = config . get ( CONF_UNIT_OF_MEASUREMENT , hass . config . units . length_unit ) zone_id = 'zone.{}' . format ( proximity_zone ) proximity = Proximity ( hass , proximity_zone , DEFAULT_DIST_TO_ZONE , DEFAULT_DIR_OF_TRAVEL , DEFAULT_NEAREST , ignored_zones , proximity_devices , tolerance , zone_id , unit_of_measurement ) proximity . entity_id = '{}.{}' . format ( DOMAIN , proximity_zone ) proximity . update_ha_state ( ) track_state_change ( hass , proximity_devices , proximity . check_proximity_state_change ) return True
set up individual proximity component .