You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, Item in JS does not expose the StateDescription and especially the Options.
According to #109 (comment) it should be possible to add these through the items metadata which I have not tested, but it is at least not possible to retrieve them that way.
In my use case, I'm looking into items which are bound to a thing's channel that only allows a couple of strings as values (like an enum).
Examples are the list of available apps in the lgwebos binding, or the allowedStates in a channel of the mqtt binding.
These allowed states are exposed in the item through the getStateDescription().options list.
A workaround at the moment is to get the raw item like below:
At the moment,
Item
in JS does not expose theStateDescription
and especially theOptions
.According to #109 (comment) it should be possible to add these through the items metadata which I have not tested, but it is at least not possible to retrieve them that way.
In my use case, I'm looking into items which are bound to a thing's channel that only allows a couple of strings as values (like an enum).
Examples are the list of available apps in the
lgwebos
binding, or theallowedStates
in a channel of themqtt
binding.These allowed states are exposed in the item through the
getStateDescription().options
list.A workaround at the moment is to get the raw item like below:
The text was updated successfully, but these errors were encountered: