eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
861 stars 784 forks source link

Thing definition: accept a label and a description for a channel group #2717

Closed lolodomo closed 7 years ago

lolodomo commented 7 years ago

Like for the "channel-type", it should be possible to define an optional label and an optional description for the "channel-group-type". The XSD has to be updated and Paper UI has to be updated to consider these "properties".

It would make channels in Paper UI clearer for certain bindings like the astro binding. https://github.com/openhab/openhab2-addons/issues/1520

lolodomo commented 7 years ago

It implies mainly:

  1. adding a label and a description field to the class ChannelGroupDefinition
  2. updating the XSD and the XML loading
  3. updating in few places where ChannelGroupDefinition is used to handle properly the new fields
  4. maybe updating Paper UI ?

Do I miss something ?

I can certainly take in charge the first 3 points.

Can I have an agreement for this change ?

kaikreuzer commented 7 years ago

it should be possible to define an optional label and an optional description for the "channel-group-type".

I assume that you mean "for the channel-group", since for the channel-group-type, this is already possible.

Can I have an agreement for this change ?

Yes, I agree that this makes sense. As you mention, we have that situation in the Astro binding and also in https://github.com/openhab/openhab2-addons/issues/1252 we came across the same issue.

If you want to go for it, that would be great! In case you get stuck somewhere, let us know. I also do not know by heart which places need to be adapted, but your list above sounds quite good.

lolodomo commented 7 years ago

Ok, I can try to update the DTD, update the XML loading and adjust the thing REST API. To validate, my test case will consist in adding a label and a description in one of the astro channel grouop, and then check that they are returned when using the thing REST API.

Can you confirm that Paper UI uses the thing REST API to get label and description for the channel groups ? If it does, it should be fixed without any additional change in Paper UI.

kaikreuzer commented 7 years ago

Can you confirm that Paper UI uses the thing REST API to get label and description for the channel groups ?

I do not know. But in any case, @aounhaider1 can probably quickly adapt the Paper UI to get the information from the right place, once it is there.

lolodomo commented 7 years ago

Bingo, it is working without changing anything in Paper UI. Cool.

lolodomo commented 7 years ago

Closed by PR #2970