After some testing this was also my assumtion. Maybe it is worth to add this to the description of the persistence service (at least i have not found it there).
How to force bindings to use the correct status for items e.g. in this case with the avmfritz binding i think it is not ok to use UNDEF if no call is incomming / outgoing.
This is then logical as UNDEF/NULL are not persist. Again the root cause is that the item should not be UNDEF/NULL (see above)
I use mapdb to persist all item status and get them back on startup:
* : strategy = everyChange, restoreOnStartup
Works fine except for those unintentional UNDEF/NULL cases.
very simple content:
UNDEF=-
i now also adopted your Passthrough not mapped proposol to may case
(function(i) {
var state = ""
var value = i
if(value == "UNDEF") {
state = "-";
} else {
state = value;
}
return state;
})(input)
It works fine if i apply this as profile in a channel