doudz / homeassistant-zigate

zigate component for Home Assistant
MIT License
48 stars 13 forks source link

Improve light polling #54

Closed Jsl-1 closed 5 years ago

Jsl-1 commented 5 years ago

Hi @doudz

I have some performance problem with some light that does not refresh their state (some phillips hue with firmware upgrade) So i forced "assumed_state":"true" in zigate.json to (badly) fix the problem, but i have some performance problem since HA refresh all readable attributes when polling

What do you think of this change to improve performance when refreshing lights ? Does it break somethings ? Full refresh can still be done on zigate entity device.

doudz commented 5 years ago

I was thinking about something like this But reading only the cluster 6 won't refresh the brightness for example I will modify the zigate lib by changing the refresh code to remove reading cluster less than 6, I think it will solve the performance issue

Jsl-1 commented 5 years ago

I forgot all brightness and color stuff, my bad :/

I just test with dev branch of zigate lib, it works nicely for now ;) I'll report to you if I have any problem.

Thank you!

doudz commented 5 years ago

Thanks, so I close this PR for now, we will reopen it later if necessary