Closed Spartan-II-117 closed 3 years ago
Hi, thanks for the PR,
In the error logging (1-5) there is an issue:
Instead of logger
, it should be _LOGGER
.
In addition, if you don't mind (otherwise I'll do that later), instead of multiple else if, you can create mapping object of reason code to description, If rc is 0, it will go to success code, otherwise it will try to extract the description from the mapping object, If found - will log it, If not, will log a generic message and finalize the loop
Thanks
I don't know how to do that in python, sorry. It does seem like a better implementation
Thanks
Add more information and stop the loop on MQTT connection failure.