@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
    'Setup the Time and Date sensor.'
    if (hass.config.time_zone is None):
        _LOGGER.error('Timezone is not set in Home Assistant configuration')
        return False
    devices = []
    for variable in config[CONF_DISPLAY_OPTIONS]:
        devices.append(TimeDateSensor(variable))
    hass.loop.create_task(async_add_devices(devices, True))
    return True
Setup the Time and Date sensor.
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
    
    if (hass.config.time_zone is None):
        _LOGGER.error('Timezone is not set in Home Assistant configuration')
        return False
    devices = []
    for variable in config[CONF_DISPLAY_OPTIONS]:
        devices.append(TimeDateSensor(variable))
    hass.loop.create_task(async_add_devices(devices, True))
    return True