Find Key Parameter Items

#📦 Variables
p_key_name   = 'Room Style' # Write Your Key-Param Name!
key_schedule = None

#1️⃣ Get all Schedules
all_schedules = FilteredElementCollector(doc)\
                .OfCategory(BuiltInCategory.OST_Schedules)\
                .ToElements()

#2️⃣ Get Key-Schedule            
for schedule in all_schedules:
    try:
        if schedule.KeyScheduleParameterName == p_key_name:
            key_schedule = schedule
            break
    except: 
        pass

#💡 Ensure you found matching schedule
if not key_schedule:
    forms.alert("Can't find matching Schedule.\nPlease Try Again.",
                                                    exitscript=True)
    
#3️⃣ Get Possible Key-Parameter Values
key_values = FilteredElementCollector(doc, key_schedule.Id).ToElements()
dict_key_values = {key.Name : key.Id for key in key_values}

#👀 Display Key-Parameter Values {Names: Id}
print('Key Parameter: {}'.format(p_key_name))
print('Matching Schedule: {}'.format(key_schedule.Name))
for k,v in dict_key_values.items():
    print(k,v)

⌨️ Happy Coding!
Erik Frits