thing-types.xml and <options> sections

75 views
Skip to first unread message

JD Steffen

unread,
Jul 30, 2015, 7:25:02 AM7/30/15
to openhab2
Hello all,

I've been playing around with OpenHAB 2 binding development and have a question regarding the <options> tags in the file. Now, I have not messed with OpenHAB 1, so this maybe has never worked, but when I set a some options like so:

<channel-type id="systemMode">
       
<item-type>String</item-type>
       
<label>System Mode</label>
       
<description>System mode: heat, cool, or off</description>
       
<state>
           
<options>
               
<option value="1">Heat</option>
               
<option value="2">Off</option>
               
<option value="3">Cool</option>
           
</options>
       
</state>
   
</channel-type>

When I go to the Paper UI, it will show the value number rather than the String describing that value. When I go to the classic UI, I see an icon that looks like a document and no value at all.

Also, I guess I was under the impression that with the <options> defined the String item would act more like a drop down box in the UI. Am I mistaken?

Additionally, what are the possible values for <item-type>?

Thanks

JD

Kai Kreuzer

unread,
Jul 31, 2015, 12:25:00 PM7/31/15
to open...@googlegroups.com
Hi JD,

I think the option list in the state description is currently not yet (well) supported in the different UIs.

When I go to the Paper UI, it will show the value number rather than the String describing that value. When I go to the classic UI, I see an icon that looks like a document and no value at all.

Yes, I would also expect to see the given label instead of the number here.

Also, I guess I was under the impression that with the <options> defined the String item would act more like a drop down box in the UI. Am I mistaken?

I am not sure if that would always make sense. Not all valid states might also be a valid command. So the main purpose to is render a label for the number.

Additionally, what are the possible values for <item-type>?


Regards,
Kai


--
You received this message because you are subscribed to the Google Groups "openhab2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab2+u...@googlegroups.com.
To post to this group, send email to open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab2/a6ca0e3a-0611-4949-96a2-16321385e35d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages