human
I wrote the below code

    def run_setup(event):
        'Wait    until    Home    Assistant    is    fully    initialized    before    creating.\n\n                                Delay    the    setup    until    Home    Assistant    is    fully    initialized.\n                                This    allows    any    entities    to    be    created    already\n                                '
        host = config.get(CONF_HOST)
        port = config.get(CONF_PORT)
        username = config.get(CONF_USERNAME)
        password = config.get(CONF_PASSWORD)
        unit = hass.config.units.temperature_unit
        monitored_conditions = config.get(CONF_MONITORED_CONDITIONS)
        api = SynoApi(host, port, username, password, unit)
        sensors = [SynoNasUtilSensor(api, variable, _UTILISATION_MON_COND[variable]) for variable in monitored_conditions if (variable in _UTILISATION_MON_COND)]
        volumes = config['volumes']
        if (volumes is None):
            volumes = api.storage.volumes
        for volume in volumes:
            sensors += [SynoNasStorageSensor(api, variable, _STORAGE_VOL_MON_COND[variable], volume) for variable in monitored_conditions if (variable in _STORAGE_VOL_MON_COND)]
        disks = config['disks']
        if (disks is None):
            disks = api.storage.disks
        for disk in disks:
            sensors += [SynoNasStorageSensor(api, variable, _STORAGE_DSK_MON_COND[variable], disk) for variable in monitored_conditions if (variable in _STORAGE_DSK_MON_COND)]
        add_devices(sensors, True)
    hass.bus.listen_once(EVENT_HOMEASSISTANT_START, run_setup)

What's a good function header?
assistant
#Here's a good function header.

def setup_platform(hass, config, add_devices, discovery_info=None):