Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Improve ThingHandler API to allow easy addition of Channels #4950

Closed
kaikreuzer opened this issue Jan 19, 2018 · 1 comment · Fixed by #5025
Closed

Improve ThingHandler API to allow easy addition of Channels #4950

kaikreuzer opened this issue Jan 19, 2018 · 1 comment · Fixed by #5025

Comments

@kaikreuzer
Copy link
Contributor

In our thing modelling FAQs, we suggest as (4) to dynamically add channels to a Thing within the handler.
As discussed here, this is currently a bit cumbersome, though, as there isn't an easy way to construct a channel from a channel type, which means that the best code I could come up with is this.

We should simplify this either by improving the ChannelBuilder or possibly by directly supporting it in the ThingBuilder (not sure yet, what is the better option).

@sjsf
Copy link
Contributor

sjsf commented Feb 1, 2018

Another victim interested party: openhab/openhab2-addons#2859 (Denon/Marantz binding)

sjsf pushed a commit to sjsf/smarthome that referenced this issue Feb 2, 2018
...for any given ChannelTypeUID in the ThingHandlerCallback and
in the BaseThingHandler corrrespondingly.

fixes eclipse-archived#4950
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
sjsf pushed a commit to sjsf/smarthome that referenced this issue Feb 2, 2018
...for any given ChannelTypeUID in the ThingHandlerCallback and
in the BaseThingHandler correspondingly.

fixes eclipse-archived#4950
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
sjsf pushed a commit to sjsf/smarthome that referenced this issue Feb 6, 2018
...for any given ChannelTypeUID in the ThingHandlerCallback and
in the BaseThingHandler correspondingly.

fixes eclipse-archived#4950
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
sjsf pushed a commit to sjsf/smarthome that referenced this issue Feb 6, 2018
...for any given ChannelTypeUID in the ThingHandlerCallback and
in the BaseThingHandler correspondingly.

fixes eclipse-archived#4950
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
sjsf pushed a commit to sjsf/smarthome that referenced this issue Feb 9, 2018
...for any given ChannelTypeUID in the ThingHandlerCallback and
in the BaseThingHandler correspondingly.

fixes eclipse-archived#4950
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
kaikreuzer pushed a commit that referenced this issue Mar 2, 2018
* Provide preconfigured ChannelBuilders

...for any given ChannelTypeUID in the ThingHandlerCallback and
in the BaseThingHandler correspondingly.

fixes #4950
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants