The issue was caused by handlePowerGet not being able to retrieve the device power state on unsupported devices.
The solution proposed by @zouma45 was only implemented on handleTargetStateSet but that function was also called by handleTargetStateGet, so I did implement it in there too.
I also made the flag isPowerSupported global to prevent handlePowerGet being called unnecessarily.
I did test this by directly modifying the scripts on my homebridge instance and reporting the same changes on the repo but I never coded a plugin for homebridge so I don't know if there is a better way to handle the isPowerSupported flag.
Related to issue #79
The issue was caused by
handlePowerGet
not being able to retrieve the device power state on unsupported devices. The solution proposed by @zouma45 was only implemented onhandleTargetStateSet
but that function was also called byhandleTargetStateGet
, so I did implement it in there too. I also made the flagisPowerSupported
global to preventhandlePowerGet
being called unnecessarily.I did test this by directly modifying the scripts on my homebridge instance and reporting the same changes on the repo but I never coded a plugin for homebridge so I don't know if there is a better way to handle the
isPowerSupported
flag.