How can i differentiate between the two states of a switch in my handle command? So i want to have something be done, when the switch turns “on” and something else when the switch turns “off”. Actually i just understand how to differentiate between the channels itself, but not the states.
The second Question is about a problem with getting a number from the configuration into the handling.
Code:
long pollingTime = (long) getThing().getConfiguration().getuvr2BindingConstants.CONFIG_PARAMETER_POLLING_TIME);
At this point i get the following exception:
java.math.BigDecimal cannot be cast to java.lang.long
The parameter type in the thingtypes.xml is “integer”.
Thank you Kai, that was too easy for me I tried it this way before, but it don’t worked out. Now i copied your code and it works. I don’t know why, but thanks