Multiple value command handling

Hey,

since I am reworking the netatmo binding I got a bit more insight into openhab2 and smarthome framework. But I am wondering, if it is somehow possible to add multiple values like duration time and temperature in to one command to prevent chaining and scheduling multiple commands. All implementations I found in the addons are primitives (switch, decimals, etc.) and do not fit the needs to set a certain temperature to a room for a discreet time.
It is acceptable to implement a custom command type? How would a rule for a custom command type look like?

thanks in advance
Michael

I can’t really answer your questions directly, but I can say for data coming in the other direction there is precedent for using JSON to encode the data.

PointType requires two data values and HSBType requires three data values, so those should probably be your model. PointType might actually work for your use case, though it would be awkward to set the temp using a Location Item.

The addition of a new Command type would probably require a new Item type as well. And the addition of these would probably need to be added in ESH and need to be vetted closely since it is so core to how OH works.