zwave-js / node-red-contrib-zwave-js

The most powerful, high performing and highly polished Z-Wave node for Node-RED based on Z-Wave JS. If you want a fully featured Z-Wave framework in your Node-RED instance, you have found it.
MIT License
47 stars 6 forks source link

[Bug]: Configuration isn't mapping numeric values to choices when manual entry is allowed #282

Open fabnavigator opened 1 year ago

fabnavigator commented 1 year ago

What happened?

I have two types of smart outlets and they both behave the same way. They have configuration parameters that are disabled when the value is zero. In the UI, there is a "Set Disable" button, and when you press it the result says "Disable". After a reinterview, the value is zero. It is not displayed as "Disable". I would like it to say "Disable" after the reinterview, not zero.

This is only when there is a manual entry option. When the configuration just has choices, it works as expected.

Disable bug

How to reproduce?

See attachment above to reproduce. You must have a node with choices, and also manual entry.

Version

8.2.0

Node-RED Version

3.0.2

What hardware are you seeing the problem on?

Raspberry Pi

Relevant Z-Wave-JS log as a text file

zwave-js.log

marcus-j-davies commented 1 year ago

@fabnavigator

Can you get to the point it is showing as 0 seconds? and then double click the value - paste here (formatted) the output. I cant reproduce this currently - after an interview (with a config that allows manual) - it is showing me the mapped constant label

fabnavigator commented 1 year ago

@marcus-j-davies, I don't understand what you are asking for. After a reinterview, if I press edit it looks as in my top screenshot. Maybe you can send the same three screenshots for your device that is working correctly.

marcus-j-davies commented 1 year ago

Screenshot 2023-08-11 at 17 26 13

marcus-j-davies commented 1 year ago

Double click reveals debug info

fabnavigator commented 1 year ago
{
   "valueId": {
      "commandClassName": "Configuration",
      "commandClass": 112,
      "endpoint": 0,
      "property": 171,
      "propertyName": "Power Report Interval"
   },
   "meta": {
      "type": "number",
      "readable": true,
      "writeable": true,
      "valueSize": 4,
      "min": 0,
      "max": 2678400,
      "default": 30,
      "unit": "seconds",
      "format": 1,
      "allowManualEntry": true,
      "states": {
         "0": "Disable"
      },
      "label": "Power Report Interval",
      "isFromConfig": true,
      "stateful": true,
      "secret": false
   },
   "propertyid": "0-112-171-",
   "endpoint": 0,
   "valueData": {
      "value": 0,
      "unit": "seconds"
   }
}
marcus-j-davies commented 1 year ago

Thanks - I modified your post to format it (backward leaning tick)

code

Clearly this is my end - but will likely improve this in V9. if its low hanging fruit/and I have time - I'll fix in V8 - but initially V9

fabnavigator commented 1 year ago

@marcus-j-davies, Thank you.

It's probably on the list, but it was hard to copy that information from the dialog because the vertical size was too large for my browser window. Should be a smaller dialog with a scroll bar. I think we might have discussed this a long time ago.