Lakritzator / harmony

C# library for connecting to and controlling the Logitech Harmony Hub.
MIT License
5 stars 0 forks source link

How to get list of Activities #18

Closed damonbrodie closed 7 years ago

damonbrodie commented 7 years ago

Not really an issue, but not sure where to ask this.

The code works great - I can get a list of the devices and their buttons etc. I can even start an activity if I know the number. Is there an API call that this framework supplies that will output the list of activities and their associated IDs?

damonbrodie commented 7 years ago

Answered my own question:

Pasting this in case it helps others:

` var harmonyConfig = await Program.Client.GetConfigAsync(); PopulateTreeViewConfig(harmonyConfig);

        foreach (var activity in harmonyConfig.Activities)
        {
            listBoxActivities.Items.Add(activity.Label);
        }`
Lakritzator commented 7 years ago

Thanks for reporting and answering your own question. I am sure this helps other too.