iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
402 stars 166 forks source link

Add new Blinds Accessory for controlling roller motor shades #463

Open ThisIsQasim opened 6 months ago

ThisIsQasim commented 6 months ago

Since the project is getting some attention again, I am re-creating #324 which is a rebase of #282

05TEVE commented 6 months ago

Hi @ThisIsQasim, Thanks for the PR. Would it be possible to add this into the existing simple blinds accessory file as another type?

ThisIsQasim commented 6 months ago

Hi @05TEVE, I can probably get it to work with a single file but I think we would end up with a lot of spaghetti code because the existing “Simple Blind Accessory” isn’t simple at all. It was for older blinds that didn’t report current position so it would calculate the position based on the time it took to fully open and close the blind. You can imagine the code for it wasn’t straight forward.

Anyways, have a look and if you still think it would be best to consolidate I’ll give it a shot.