jperkin / node-openzwave

node.js interface to libopenzwave
Other
110 stars 55 forks source link

switch does not work #15

Open gvdhoven opened 10 years ago

gvdhoven commented 10 years ago

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...

jperkin commented 10 years ago

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?

gvdhoven commented 10 years ago

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