OH3: 'getEvent' is not a member of 'java.lang.String'

  • Platform information:
    • Hardware: Raspberry Pi 3 Model B Plus Rev 1.3
    • OS: OpenHabian
    • Java Runtime Environment: Zulu11.43+88-CA
    • openHAB version: 3.0
  • Issue of the topic: Rules that use method getEvent fail with error.
  • If logs where generated please post these here using code fences:
    2020-12-29 18:26:50.286 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘Neeo-1’ failed: ‘getEvent’ is not a member of ‘java.lang.String’; line 7, column 20, length 24 in Neeo

Everything worked fine on 2.5 before I upgraded to 3.0.

I hit this also

Check out Releases · openhab/openhab-distro · GitHub

Specificly under Rules

The implicit variable receivedEvent(of channel-based triggers) now contains the event directly as a String and no longer as an object. There is hence no need to call receivedEvent.getEvent() anymore.

2 Likes

Agreed. this forum is not a replacement for RTFM.