I am currently trying to prevent my rule from triggering multiple times.
Here is an example (please not that the timer four minutes is just an example it could be anything else e.g. timer 2 hours, timer 30 seconds):
2019-11-22 16:57:36.870 [vent.ItemStateChangedEvent] - SalexesEchoDot_LastVoiceCommand changed from THISCOULDBEANYTHING to timer four minutes
2019-11-22 16:57:41.008 [vent.ItemStateChangedEvent] - SalexesEchoDot_LastVoiceCommand changed from timer four minutes to
2019-11-22 16:57:41.029 [vent.ItemStateChangedEvent] - SalexesEchoDot_LastVoiceCommand changed from to timer four minutes
Currently my rule is triggering twice be cause it changes 2 times to “timer four minutes”
If your problem is that it always changes to - what, empty string? space? We can’t tell from that - but you should be able to check in your rule if previousState was the blank/empty string and ignore it…
previousState is a predefined implicit variable in rules DSL
It’s only available if your secret rule is triggered off changed, which seems to be your complaint.
I don’t know what happens when you overload it with some persistence based evaluation, nothing good I expect.
If you must use the persistence based version - beware, it takes time to record a new value so xxx.previousState may or may not give what you expect when triggered from an event that you also expect to record new values.
xxx.previousState returns an HistoricItem object, as your logging showed you. You’d be interestesd in the .state property of that xxx.previousState.state
Remember this is all a workaround - four changes in 20mS is your underlying problem.
No-one else seems to see this? Should be looking at your Thing/channel config?