pysonofflan icon indicating copy to clipboard operation
pysonofflan copied to clipboard

Sonoff TH10/TH16 initial support

Open fsalomon opened this issue 4 years ago • 3 comments

This adds some initial support for https://www.itead.cc/wiki/Sonoff_TH_10/16 and adds "device_class" cli option Usage: pysonofflanr3 --host xxx --device_id xxx --api_key xxx --device_class SonoffTemperatureHumidity on

Currently, only on/off are supported. If device is in "temperature" mode, it will switch to "normal" mode. I plan to add temperature read out and manipulation of temperature low/high target later once this PR is merged.

Please check if that matches your code style/best practices. Disclaimer: I'm not really a Python guy.

fsalomon avatar Jul 19 '20 02:07 fsalomon

As you can see, the build is failing above, not sure why, it seems to have started failing some weeks back. However I note that your PR hasn't updated the tests or the readme, so even if the build were passing, it wouldn't be ready to integrate.

Does the test suite run on your machine as it looks like some external dependency has broken the Travis build

mattsaxon avatar Jul 20 '20 16:07 mattsaxon

Hello Guys,

Can someone help me out how to add the --device_class option to the script ?

Error: no such option: --device_class

I have updated the 3 files from /usr/local/lib/python3.8/dist-packages/pysonofflanr3/

Thank you,

Lasszo avatar Feb 20 '22 01:02 Lasszo

Sorry I don't maintain this integration anymore. I've moved to the integration Alexxit created for home assistant.

mattsaxon avatar Feb 20 '22 07:02 mattsaxon