Accessing item command options from javascript rule

Hello,

I have an item, where some command option values are defined.
Is it possible to access this list from a javascript rule?
I read about item metadata in blockly, but am not sure if this is the correct way and if so, how to do it correctly.

Yes, you need to pull the stateDescription metadata. The command options are under configuration['options'].

It’s going to be a String of name=value pairs which will need to split and parsed. There are blocks under the text category for that.

To see the names of the properties of any metadata, navigate to the Item, click on the metadata of interest and click on the “Code” tab.