tonesto7 / homebridge-smartthings

SmartThings Homebridge Plugin
383 stars 766 forks source link

Fixes device commands with 0 valued parameters. #291

Closed FlorianZ closed 4 years ago

FlorianZ commented 5 years ago

When sending device commands, explicitly compare parameter values to null. This allows command parameters that would otherwise implicitly evaluate to false in conditionals (e.g. 0 value integers.)

Prior to this change, for example, a 'setLevel(0)' command would be sent to the device handler as 'setLevel()' and not all devices (e.g. window coverings) are able to gracefully handle the elided parameter value.