Can Javascript transformation service return "no change value"?

Using following item with mqtt and JS transformation
String Alarm_State “Alarm [%s]” (gAlarm) { mqtt="<[homemqtt:Paradox/Events:state:JS(alarmState.js)]"}

Sometimes I do receive Paradox/Events mqtt message that do not contain alarm state. Can alarmState.js somehow return a special value meaning “no change” or maybe “previous value” ?

BR,
Tihomir Heidelberg

You can use a proxy item and base your logic from that proxy item.

You can also use persistence. On a rule, check if updated value is an accepted value. If not, restore previous state.

I got that idea too, but looks a bit overengineering. And it get quite ugly when you have 20 such items. I would expect javascript null does the job here. Another solution is to write bogus javascript that will throw exception in case there is no required value, it does the job, but then log is too ugly :frowning: