[mihome] Update README.md (#11926)

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
This commit is contained in:
RadOle 2022-03-10 21:24:32 +01:00 committed by GitHub
parent 6da183495d
commit 1a2dcc65fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,8 +246,8 @@ rule "Mijia & Aqara Wireless Switch"
when
Channel "mihome:sensor_switch:<GwID>:<ID>:button" triggered
then
var actionName = receivedEvent.getEvent()
switch(actionName) {
switch(receivedEvent) {
case "SHORT_PRESSED": {
<ACTION>
}
@ -267,8 +267,7 @@ rule "Mijia & Aqara Cube Controller"
when
Channel 'mihome:sensor_cube:<GwID>:<ID>:action' triggered
then
var actionName = receivedEvent.getEvent()
switch(actionName) {
switch(receivedEvent) {
case "MOVE": {
<ACTION>
}
@ -303,8 +302,7 @@ rule "Aqara Smart Motion Sensor"
when
Channel 'mihome:sensor_vibration:<GwID>:<ID>:action' triggered
then
var actionName = receivedEvent.getEvent()
switch(actionName) {
switch(receivedEvent) {
case "VIBRATE": {
<ACTION>
}