Channel with range

Hi all

In my new binding I wont to give the option to select string value between 0 to 180
What is the best channel type for that?


Does it really have to be a string ?

It could be a number

So you could use a number channel type, defining min and max values.

Is it possible to define values under channel-type?
Where I can find reference for the configuration files?

Here’s an example :

	<channel-type id="humidity">
		<description>Current humidity</description>
		<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>

You’ll find XML description here, think also to dig in openhab-addons repo.

1 Like