Try switch with expire rule and its work OK
In my UI I want to send 3 or more different option for expire
After reading expire binding doc I understand that this is not support so I try to add string item and use it for help like this:
Item
String LightSwitchExpiration
Switch LightSwitch “Light” {expire=“LightSwitchExpiration,command=OFF”}
Rule
rule “Test Timer”
when
Item LightSwitchExpiration changed
then
LightSwitch.sendCommand (ON)
end
the switch never turn off
019-03-20 18:12:21.473 [ome.event.ItemCommandEvent] - Item ‘LightSwitchExpiration’ received command 30s
2019-03-20 18:12:21.493 [vent.ItemStateChangedEvent] - LightSwitchExpiration changed from 10s to 30s
2019-03-20 18:12:21.511 [ome.event.ItemCommandEvent] - Item ‘LightSwitch’ received command ON
Please use code fences, it makes reading your topic much easier for those who are willing to provide you with help. Note that in Firefox the buttons may not show up but if you hover over them then the fly over help will popup.
The documentation also states the format the must be used:
In your case the Expire binding reads ‘LightSwitchExpiration’ as a literal text string. It will not lookup the value of the LightSwitchExpiration item. The text ‘LightSwitchExpiration’ does not qualify as a correct time and hence the expire binding does not know when it should expire the state.