Bindings avmfritz and TR 064 only deliver UNDEF

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

For the same thing but another channel i use the phonebook (Telefonbuch) profile and i see as expected UNDEF as long as no call is done.

Therefore i use the JS in the Pattern of the stateDescription based on the assumtion that i can use only one transformation at a channel.

Unfortunately nothing changes for those cases, i still see the UNDEF!

Thanks to rossko57 some progress made but still not all issues solved.

based on another post from rossko57
OH3: Item state UNDEF → convert to zero
i also learned that

  • transformation applied on a channel really change the state
  • transformation applied on items metadata keep the state but change how the state is display.

Each day i learn more about OH what you can’t find in the documentation.