mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[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:
parent
6da183495d
commit
1a2dcc65fb
@ -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>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user