Following https://www.openhab.org/docs/configuration/rules-dsl.html#rule-examples
one can find receivedEvent is now implicitly available in every rule that has a channel-based trigger
when
Channel "mihome:sensor_switch:<GwID>:<ID>:button" triggered
then
- var actionName = receivedEvent.getEvent()
- switch(actionName) {
+
+ switch(receivedEvent) {
case "SHORT_PRESSED": {
<ACTION>
}
when
Channel 'mihome:sensor_cube:<GwID>:<ID>:action' triggered
then
- var actionName = receivedEvent.getEvent()
- switch(actionName) {
+ switch(receivedEvent) {
case "MOVE": {
<ACTION>
}
when
Channel 'mihome:sensor_vibration:<GwID>:<ID>:action' triggered
then
- var actionName = receivedEvent.getEvent()
- switch(actionName) {
+ switch(receivedEvent) {
case "VIBRATE": {
<ACTION>
}