piekstra / tplink-cloud-api

A Python library to remotely control TP-Link smart home devices using their cloud service - no need to be on the same network as your devices
GNU General Public License v3.0
41 stars 11 forks source link

Offline EMeter devices #40

Closed Jon-Salmon closed 3 years ago

Jon-Salmon commented 3 years ago

I found an issue with reading power data from e-meter devices if the device is offline where an exception was thrown instead of null being returned which used to happen.

I haven't updated the other methods in this file but I suspect they experience the same error. I wasn't sure if you wanted to return None or an empty array in those cases.

piekstra commented 3 years ago

Great catch @Jon-Salmon! Thanks for the pull request. Looks like there are some other functions that regressed as well. I will fix them in a separate follow-up PR and then package the whole lot in a new release.

piekstra commented 3 years ago

The fixes are out with release 2.9.1. Thanks again @Jon-Salmon !

https://github.com/piekstra/tplink-cloud-api/releases/tag/v2.9.1

Jon-Salmon commented 3 years ago

Many thanks for the fix, great project!