smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
61 stars 25 forks source link

[amazonechocontrol] lastVoiceCommand: No item-changed-event, when command is repeated #266

Closed SteWers closed 2 years ago

SteWers commented 2 years ago

When repeating a voice command, e.g "Gute Nacht", "Gute Nacht" there is no change of the item state and so a rule isn't triggered. This behaviour is since V3.28. In older versions the item state is set to "" between two commands. A workaround is to trigger the rule with "received update" instead of "changed". For the compability to existing rules, the "old" behaviour would be good. I think it is caused through the PR #236.

J-N-K commented 2 years ago

This change was intentionally as a transition from "Gute Nacht" to "Gute Nacht" is not a state change but an update. The behavior before was erroneous and has therefore been corrected. Using "Received update" is not a workaround but the required trigger if you want to be notified about every update and not only about state changes.

J-N-K commented 2 years ago

I have updated the release notes with the following:

Breaking Change Notification

The lastVoiceCommand channel of the amazonechocontrol binding changed it's behavior. Due to a wrong implementation the channel changed it's state to an empty string if the same command was received again. This has been corrected. If you want to be notified about every state update, please adjust your rule triggers to "received update". If you want to be notified about state changes (i.e. different commands), use state changed.

I'll also add a similar note to the binding documentation.