[hue] Fix rule example (#9928)

Updated README.md with example working under openhab 3.0.
The receivedEvent does no longer have a method getEvent().
This commit is contained in:
Daniel Pape 2021-01-24 11:36:56 +01:00 committed by GitHub
parent 9203603f2a
commit 3c2960e1fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,12 +357,12 @@ end
```
The optional `<EVENT>` represents one of the button events that are generated by the Hue Dimmer Switch.
If ommited the rule gets triggered by any key action and you can determine the event that triggered it with the `receivedEvent.getEvent()` method.
If ommited the rule gets triggered by any key action and you can determine the event that triggered it with the `receivedEvent` method.
Be aware that the events have a '.0' attached to them, like `2001.0` or `34.0`.
So, testing for specific events looks like this:
```php
if (receivedEvent.getEvent() == "1000.0")) {
if (receivedEvent == "1000.0")) {
//do stuff
}
```