joeyhage / homebridge-alexa-smarthome

Connect Alexa devices to HomeKit
MIT License
62 stars 20 forks source link

fix (#79): skip power state for non supported device for get & set thermostat mode #88

Closed nyirsh closed 6 months ago

nyirsh commented 6 months ago

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

joeyhage commented 6 months ago

Thanks for submitting a pull request, @nyirsh! I'm reviewing it now.