gitbock / fritzboxtr064

Binding for openHAB for communicating with AVM FritzBox
16 stars 12 forks source link

OH2 incomming call conversion warning #26

Open GeneralLuzi opened 7 years ago

GeneralLuzi commented 7 years ago

HI,

I get the following warnings:

2017-01-29 14:14:29.077 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '123456789' of item fboxIncomingCall with format '%1$s für %2$s': java.util.MissingFormatArgumentException: Format specifier '%2$s'
2017-01-29 14:14:29.077 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '' of item fboxOutgoingCall with format '%1$s für %2$s': java.util.MissingFormatArgumentException: Format specifier '%2$s'

I use OH2.

Sitemap:

Text   item=fboxIncomingCall icon="phone"
Text   item=fboxOutgoingCall     icon="phone"

Items:

Call    fboxIncomingCall                "Eingehender Anruf: [%1$s für %2$s]"                    {fritzboxtr064="callmonitor_ringing" } 
Call    fboxOutgoingCall                "Ausgehender Anruf: [%1$s für %2$s]"                    {fritzboxtr064="callmonitor_outgoing" }

Ringing and parts of the presence detection are working... so no config error...

BR, GL

mueller-ma commented 7 years ago

I can confirm this with oh2 and openjdk-8

It seems that the item state changes to nothing when the call is over, so there will be no '%2$s'

mueller-ma commented 7 years ago

@GeneralLuzi I found a workaround. Make the item with number or name only visible when the switch item is on