human
Solve the following python programming problem given the following code:
@asyncio.coroutine
def async_trigger(hass, config, action):
assistant
#Here is the Python code you requested.

    """Listen for state changes based on configuration.
    """
    if (CONF_AT in config):
        at_time = config.get(CONF_AT)
        (hours, minutes, seconds) = (at_time.hour, at_time.minute, at_time.second)
    else:
        hours = config.get(CONF_HOURS)
        minutes = config.get(CONF_MINUTES)
        seconds = config.get(CONF_SECONDS)
    @callback
    def time_automation_listener(now):
        'Listen    for    time    changes    and    calls    action.'
        hass.async_run_job(action, {'trigger': {'platform': 'time', 'now': now}})
    return async_track_time_change(hass, time_automation_listener, hour=hours, minute=minutes, second=seconds)