Updating available options of enumeration preference

At first, I had this in my device profile…

preferences:
  - name: presentation
    title: Presentation
    required: true
    preferenceType: enumeration
    definition:
      options:
        normal_multi_switch_v6: Normal
        switch_all_multi_switch_v6: Normal + Switch All
        custom_multi_switch_v6: Custom
      default: normal_multi_switch_v6

Then I decided to include a new option…

preferences:
  - name: presentation
    title: Presentation
    required: true
    preferenceType: enumeration
    definition:
      options:
        normal_multi_switch_v6: Normal
        switch_all_multi_switch_v6: Normal + Switch All
        custom_multi_switch_v6: Custom
        generic_ef00_v1: Generic # <-- this is the new option
      default: normal_multi_switch_v6

But the new option refused to show up in the list.

Then I decided to duplicate this preference and created presentation2 and magically the options list updated in both preferences (presentation and presentation2)

Then I just removed presentation2 and the options list of presentation returned to the initial 3 options.
I thought it could be cache, then I cleaned cache, removed driver, waited 24 hours and nothing changed.

So my question is: What do I need to do to update the options list of an old preference without having to create a new fake preference ?

EDIT: I added a description to the preference and it forced updating the options list.
So, probably, I will need to play with trailing spaces in order to force updating the preference.

Try to restart the hub

This issue is already reported, the other way to update it I’ve seen is when I delete the driver package completely, change its packageKey and package it again.
I don’t know if now changing the text of the description field would force a refresh as it already exists.

If you look at the device profile generated for the device (smartthings deviceprofiles profiled -y), it still has the previous configuration, so, it is not solved by clearing the app’s cache because it’s showing what is in the profile’s metadata.

1 Like

I just had to include another option and it didn’t show up.

Then I added a trailing space in the description and it worked!

Changed this:

description: Recommended only for testing whether your device is compatible or not with the ones already predefined.

To this:

description: "Recommended only for testing whether your device is compatible or not with the ones already predefined. "

image

1 Like