I’m thinking about moving some thing properties of the comfoair binding to thing configuration. However, I’m not quite sure how to best implement this.
These properties currently indicate if certain modules are installed in the device. To make it possible for the user to change the device configuration, I would like to implement them as thing configuration options. This raises some issues:
- The current configuration cannot be pulled from the device before setting up serial connection and thus before thing initialization. So the user would have to set all options correctly by themselves, which cannot be expected from a common user.
- The device itself does only know about current settings. So, whatever the user sets to be installed is reflected as such by the device.
- Due to a lot of different device configurations, there is no standard setting that could be applied.
So I could think of a few options to solve this, but I don’t know, which would be possible with the framework or what would be the best option.
- Add a switch to the configuration to set if settings should be pulled from the device or current thing configuration should be used. Best would be, if the other configuration options are only shown, if the switch is enabled.
- Don’t show the configuration options on initial setup, but rather only make them available when editing the thing. Don’t know if this is even possible?
Any advice what would be preferable or any option that I didn’t think of? Could you even point to an appropriate reference implementation?