jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
879 stars 159 forks source link

Add Contrib support for Inverter Heat Pump such as Fairland IPHR55 #368

Closed valentindusollier closed 1 year ago

valentindusollier commented 1 year ago

This adds support for Inverter Heat Pump such as Fairland Inverter+ 21kW (IPHR55).

valentindusollier commented 1 year ago

I made the dotenv module optional. It is only use in /testcontrib.py in order to load environment variables from .env file. However it's not really needed. Moreover, this module is not installed in the workflows.

uzlonewolf commented 1 year ago

I do like the idea, but unfortunately python-dotenv only supports Python v3.8+ which is a bit too restrictive. At some point we should probably rework the whole contrib test system to add tests like this for the other contrib modules as well.

valentindusollier commented 1 year ago

Yes, you're right. I think the right way to go for now is to remove it from requirements.txt and leave it as optional in /testcontrib.py. This way those who have the module installed can use it but /testcontrib.py works fine without dotenv as well. What do you think ?

uzlonewolf commented 1 year ago

Yes, that sounds good.

valentindusollier commented 1 year ago

Done ✅

jasonacox commented 1 year ago

Thanks @valentindusollier !