How do you set the defaultCurrentState that should be displayed?

I have written an app and drivers and I am trying to figure out how to set the defaultCurrentState for switch devices to "switch" and for dimmable to "level" but I can't seem to find a way to do it via groovy.

image

This is the setting I want to set by default but I can't seem to figure it out.

You can't; this is a "pseudo" preference generated by the hub and only settable by the user.

2 Likes

Thank you so much! That was my assumption but I couldn't prove that was the case.

I have another question if you happen to know...

Is there a way to prevent a driver from being installed if not via the parent app? I didn't see any documentation which shows that you can block direct installation of a driver. My devices have a requirement to communicate to the parent so they can communicate with a network device.

I have documented that devices should be added via the wizard, but just wanted to see if there is a prevention mechanism.

No, that isn't possible, either. (Documentation can work around it. :grinning:)

1 Like

You are too kind for the responses. Thank you again for taking the time.