I want to create a button that returns an ON value when confirmed and an OFF value when released.
How and with what can I create a rule in OH3?
I want to create a button that returns an ON value when confirmed and an OFF value when released.
How and with what can I create a rule in OH3?
Is this what you are looking for?
This still applies
I have created the following Rule:
Rule "Comannd Off after Time"
when
item Rolloheben_ValueasSwitch received command ON
then
createTimer(now.plusMillis(300), [
triggeringItem.sendCommand(OFF)
])
but the log says this:
2021-05-03 12:37:23.389 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'a5a0950b80' failed: ___ Rule ___ "Comannd Off after Time"
when
item Rolloheben_ValueasSwitch received ___ comm ___ and ON
then
createTimer(now.plusMillis(300), [
triggeringItem.sendCommand(OFF)
])
1. The method or field Rule is undefined; line 1, column 0, length 4
2. The method or field when is undefined; line 3, column 33, length 4
3. The method or field item is undefined; line 4, column 40, length 4
4. The method or field received is undefined; line 4, column 70, length 8
5. The method or field command is undefined; line 4, column 79, length 7
6. The method or field then is undefined; line 5, column 90, length 4
7. The method plusMillis(int) is undefined for the type ZonedDateTime; line 6, column 114, length 10
8. This expression is not allowed in this context, since it doesn't cause any side effects.; line 1, column 5, length 24
9. This expression is not allowed in this context, since it doesn't cause any side effects.; line 4, column 45, length 24
10. This expression is not allowed in this context, since it doesn't cause any side effects.; line 4, column 87, length 2
See