luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

Fix crash on empty state_cmd #33

Closed sieren closed 6 years ago

sieren commented 6 years ago

According to the documentation state_cmd is supposed to be optional. Previously the plugin would crash as it would attempt to run the state_cmd anyway. This fix is returning the cached state if state_cmd is undefined.

Adresses: https://github.com/luisiam/homebridge-cmdswitch2/issues/31

epheterson commented 6 years ago

Has this been released? The issue is still happening for me.