-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Add an ItemStateUpdatedEvent #2956
Comments
@spacemanspiff2007 I would appreciate if you could shortly describe what the use-case for the |
Thank you @J-N-K for consolidating the issues. When consuming the events I need an event on which I can set the locally cached item state accordingly. sequenceDiagram
participant openHAB
participant device
participant sse listener
openHAB->>+device: command
openHAB->>sse listener: ItemCommandEvent
device->>-openHAB: report state
loop
openHAB->>openHAB: Set item state
end
openHAB->>sse listener: ItemStateEvent
openHAB->>sse listener: ItemStateChangedEvent (optional)
However it's very confusing that the I can not use the I hope the example makes it clear that there is the need for an event which contains the current, updated item state. Since the |
Other useful things that this event could implement:
|
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/openhab-4-0-wishlist/142388/449 |
Follow-Up To #1092, #1093, #2286
There has been quite some confusion about the
ItemStateEvent
which is not emitted by the item if the state was updated but by an "external" source to update the item's state. Since these external sources do not necessarily know about the item type (e.g. a switch in the UI is agnostic of the item being Color, Dimmer or Switch and will send ON or OFF) or the unit of the item, the state in theItemStateEvent
does not reflect the new item's state.It seems that there are use cases for an event that is emitted if the state was updated and what the new state is (similar to the
ItemStateChangedEvent
).The text was updated successfully, but these errors were encountered: