alexryd / homebridge-shelly-ng

Homebridge plugin for the next generation of Shelly devices
GNU General Public License v3.0
120 stars 43 forks source link

Fixing state update correctly on homebridge #108

Open BirknerAlex opened 6 months ago

BirknerAlex commented 6 months ago

Fixes https://github.com/alexryd/homebridge-shelly-ng/issues/61

MaxiHuHe04 commented 1 month ago

For me, this doesn't change anything apparently. It seems that target_pos is not updated correctly in the shellies-ng Cover component if it is opened/closed using a physical switch. I didn't investigate at all, but this could perhaps be a bug in the Shelly API itself. A quick and dirty fix that worked for me without changing anything in the library was updating the target position to the value of the current position in the currentPosChangeHandler.