node-openzwave icon indicating copy to clipboard operation
node-openzwave copied to clipboard

switch does not work

Open gvdhoven opened this issue 12 years ago • 2 comments

The following switch does not seem to work; switch (comclass) { case 0x25: // COMMAND_CLASS_SWITCH_BINARY case 0x26: // COMMAND_CLASS_SWITCH_MULTILEVEL zwave.enablePoll(nodeid, comclass); break; }

wheras this works: if (comclass == 0x26) { zwave.enablePoll(nodeid, comclass); }

don't know why btw...

gvdhoven avatar Oct 31 '13 18:10 gvdhoven

One reason for that would be if comclass was a string rather than an integer, but in theory that shouldn't happen - did you modify anything or is this with the code as-is?

jperkin avatar Oct 31 '13 18:10 jperkin

as is; but the 'if'' is directly below it, and that seems to work..

gvdhoven avatar Nov 01 '13 13:11 gvdhoven