SebuZet / samsungrac

Home Assistant Climate Device for controlling (not only) Samsung AC
65 stars 31 forks source link

Catch network exceptions and return None instead of -1000 #3

Closed kirichkov closed 5 years ago

kirichkov commented 5 years ago

I've been testing this for 48 hours and I think it works well. Once in a while I get "Connection refused" by the controller, but I think the timeout has significantly improved the component's operation.

I've also replaced the -1000 value returned for inaccessible properties, because the correct one should be None. This should normally set the value to unavailable in the front end, which is more desirable than -1000. -1000 destroys the pretty graphs 😉