ollo69 / ha_tuya_custom

Tuya Custom Component for testing
Apache License 2.0
39 stars 18 forks source link

Coordinating API calls #1

Closed nao-pon closed 4 years ago

nao-pon commented 4 years ago
nao-pon commented 4 years ago

I found a problem. There is no problem if the light switch is turned off, but if it is turned on, the HA status display will not be retained and it will return to off.

I will try to fix it.

ollo69 commented 4 years ago

I do not merge this PR because I used a different approach. My opinion is that status check should not be inside the API but related to the device. Furthermore also other device information in cache should be updated when changed (as brightness, color, etc) or HA refresh will set back to original values after Cloud refresh fail. Please take a look to my last commit.

nao-pon commented 4 years ago

@ollo69 OK, I got it. Thanks! 👍