<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_platform(hass, config, add_entities, discovery_info=None):
 """Set up the VeSync switch platform."""

    if discovery_info is None:
        return

    switches = []

    manager = hass.data[DOMAIN]['manager']

    if manager.outlets is not None and manager.outlets:
        if len(manager.outlets) == 1:
            count_string = 'switch'
        else:
            count_string = 'switches'

        _LOGGER.info("Discovered %d VeSync %s",
                     len(manager.outlets), count_string)

        if len(manager.outlets) > 1:
            for switch in manager.outlets:
                switch._energy_update_interval = ENERGY_UPDATE_INT
                switches.append(VeSyncSwitchHA(switch))
                _LOGGER.info("Added a VeSync switch named '%s'",
                             switch.device_name)
        else:
            switches.append(VeSyncSwitchHA(manager.outlets))
    else:
        _LOGGER.info("No VeSync switches found")

    add_entities(switches)