Closed etheralm closed 4 years ago
ops, just realised I missed one spot with the tests, I'll add them in a sec.
Thanks a lot for your work! I'll try to take a look at this PR this WE and merge it as soon as possible.
You're welcome, I would like to thank you for the awesome job with the module too, glad I could help.
@CharlesBlonde - any chance we could merge this PR? Any help needed testing it?
This PR works great for my TP04, thanks a lot! Hope it gets merged soon.
BTW, it looks like new version of the app allows a fixed direction control without oscillation, for example setting both angles to 180 points the fan straight, setting both to 90 - to the left.
@exking
you can actually do that with this pr too. Use the enable_oscillation method and pass the same angle to oscillation_angle_low and oscillation_angle_high (the angle can be between 5 and 355 degrees and represents the position of the fan). For example if you want to move the fan to 90 use:
fan.enable_oscillation(90, 90)
This is what the app sends via MQTT as far as I saw when I was looking at it. If you find it more convenient i can add a set_angle(angle) and move_left(degrees) and move_right(degrees) methods to make it easier to manipulate the position.
@etheralm Thanks, I missed the fact that 30 degree spilt is now required only if angels are different. Single method should be fine!
@CharlesBlonde please check & merge this pr
@CharlesBlonde I don't want to bother you, but I'm almost ready to submit a pr for support for those fans in home assistant and I really don't want to to link this module statically in it, or push a separate module to pypi. Can you please review and merge this.
@CharlesBlonde a merge of this PR would be greatly appreciated. I've just bought a TP04 and was looking at making the changes myself, then came across the great work @etheralm has been making.
@CharlesBlonde Hi, can you please find time to review/merge this?
@etheralm If @CharlesBlonde is unable, can you just work off of a fork for home-assistant?
@CharlesBlonde Would be very appreciated if you could merge this PR :)
Hi guys, sorry about the delay, was really busy last 2 months.
I just submitted a PR for home assistant which uses this PR and adds support for the 2018 models.
You can track the progress here: link
@CharlesBlonde I pushed this pr in pypi under the name libpurecool so that I can use it for home assistant. Let me know when you get the time to merge it and I'll remove the fork there.
Hi, I just extended the libpurecoollink module with support for the new 2018 pure cool purifier modules. Let me know what you think. Btw currently this supports only the tower model since I don't have the product type of the desktop one, if someone has it I'll be happy to add it to the list and test if everything works properly.