Skip to content

Wrong event name for StateUpdatedEvent / StateChangedEvent #4744

Open
@spacemanspiff2007

Description

@spacemanspiff2007

The new fields for last change / last update have different names in different events making them very hard to consume.

  • ItemStateUpdatedEvent -> lastUpdate
  • ItemStateChangedEvent -> lastStateUpdate + lastStateChange
{"type": "ItemStateUpdatedEvent", "topic": "openhab/items/SwPKEghgdy/stateupdated", "payload": {"type": "OnOff", "value": "OFF", "lastUpdate": "2025-04-23T22:18:25.0464742+02:00[Europe/Berlin]"}}
{"type": "ItemStateChangedEvent", "topic": "openhab/items/SwPKEghgdy/statechanged", "payload": {"type": "OnOff", "value": "OFF", "oldType": "OnOff", "oldValue": "ON", "lastStateUpdate": "2025-04-23T22:18:25.0464742+02:00[Europe/Berlin]", "lastStateChange": "2025-04-23T22:18:25.0464742+02:00[Europe/Berlin]"}}

{"type": "GroupStateUpdatedEvent", "topic": "openhab/items/GrpKBDxvsz/SwRTRevpbt/stateupdated", "payload": {"type": "OnOff", "value": "OFF", "lastUpdate": "2025-04-23T22:18:31.0302278+02:00[Europe/Berlin]"}}
{"type": "GroupItemStateChangedEvent", "topic": "openhab/items/GrpKBDxvsz/SwRTRevpbt/statechanged", "payload": {"type": "OnOff", "value": "OFF", "oldType": "OnOff", "oldValue": "ON", "lastStateUpdate": "2025-04-23T22:18:31.0302278+02:00[Europe/Berlin]", "lastStateChange": "2025-04-23T22:18:31.0302278+02:00[Europe/Berlin]"}}

Please align the field names

#4601 #4351

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of the Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions