HomeSeer / Plugin-SDK

Plugin development kit for the 4th major edition of the HomeSeer platform.
https://www.nuget.org/packages/HomeSeer-PluginSDK/
GNU Affero General Public License v3.0
21 stars 5 forks source link

Cannot retrieve category ID #101

Closed stefxx closed 4 years ago

stefxx commented 4 years ago

Environment and System Config

Describe the issue Thanks for adding the Category functions. However, there is no easy way to get the ID of the category, which is required for most of the related functions. I believe there is an issue with the GetAllCategories() return values. It returns the name of the category for both Key and Value. I was expecting the ID for Key, and Name for Value.

Steps to Reproduce Dim test = hs.GetAllCategories().First result: {[Appliances, Appliances]}

Expected behavior I was expecting the ID for Key, and Name for Value.

stefxx commented 4 years ago

Also, a new function "GetCategoryByName(Name as String) as String" returning the GUID would be a useful additional.

stefxx commented 4 years ago

Also, shouldn't "CreateCategory("name", "image")" return the GUID? Currently it returns an empty string.

rjhelmke commented 4 years ago

Also, shouldn't "CreateCategory("name", "image")" return the GUID? Currently it returns an empty string.

Yes, I have put in a fix for build 4.1

stefxx commented 4 years ago

Works in 4.1.0.0, so I guess we can close this. Thanks!