ncwekjn
(First Last)
November 25, 2018, 3:20pm
1
openHAB version: 2.4.0~M6-1 (Milestone Build)
I keep getting strange warnings in the log file:
[WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value 'OFF' of item xxx with format '%.0f': f != java.lang.String
The item, a Z-Wave keypad, is defined as:
Switch xxx "RFID Keypad Armed" <alarm> (GF_Hallway, Home) {channel="zwave:device:512:node12:notification_access_control"}
It’s shown fine in the mobile app, except for the status which is ‘Err’:
I’m not formatting the value myself, my only usage in rules is like:
when
Item xxx changed to ON
How can I get rid of that warning and why is it there?
mhilbush
(Mark)
November 25, 2018, 3:28pm
2
Try defining it as a Number instead of a Switch.
The notification_access_control channel is defined as type Number.
1 Like
ncwekjn
(First Last)
November 25, 2018, 4:11pm
3
Thanks, at least that’s explained now. I have some further questions then:
Why does it work properly as a switch (with ON/OFF), for example, I don’t need to cast it to OnOffType
?
How should I declare a switch that I can use instead to turn access control on/off?
mhilbush
(Mark)
November 25, 2018, 4:59pm
4
But it wasn’t working properly as a switch.
This is a zwave device, right? Is there a config parameter to enable/disable access control? If so, a channel can be declared in the device database on the CONFIGURATION command class that sends the proper config parameter and value to enable/disable access control.