rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.84k stars 545 forks source link

Support bi-directional fans #800

Open ghost opened 2 years ago

ghost commented 2 years ago

The problem

Not a problem exactly, but an improvement!

Environment

Steps to reproduce

  1. Setup Device

Configuration configuration.yaml or config_flow

Type: Fan ID: 1 Fan Speed Control: 3 Fan Direction DPS: 2 Forward DPS String: in Reverse DPS String: out

Additional information

I left off the dump and logs, as they don't seem relevant as this isn't a bug.

I have an Aspen window fan. Local Tuya actually works amazingly, and I am ever thankful for this project! I found the config flow that works as I expect, however, I was hoping it could be possible to add a feature. The Aspen fan has three direction modes: in, out, and exch. There are two fan blades. In pulls air in with both fans, out is exhaust with both fans, and exch is a circulation mode where one fan is in and one is out. I can control the fan perfectly fine with in and out, but it would be awesome to have the exch function as well, since that's what I use most of the time in my office. The screenshot shows the direction value of exch. in the config flow. While it's in exch, I lose direction control on the entity. When in or out are selected, I can cycle between those two as intended. Such a minor thing to be asking, but as I can confirm this fan works, perhaps we can get it added to the list of qualified devices?

Aspen Window Fan: https://www.amazon.com/ASPEN-Controlled-Multi-Function-Detachable-Reversible/dp/B08KTQVN93/ref=asc_df_B08KTQVN93?tag=bingshoppinga-20&linkCode=df0&hvadid=80333178220835&hvnetw=o&hvqmt=e&hvbmt=be&hvdev=c&hvlocint=&hvlocphy=&hvtargid=pla-4583932711665399&psc=1

image

ghost commented 2 years ago

Information device entities to setup the device in full. Only missing the exch direction format!

Fan- Type: Fan ID: 1 Fan Speed Control DPS: 3 Fan Direction DPS: 2 Forward DPS String: in Reverse DPS string: out

Temperature Cut-off Switch- Type: Switch ID: 101

Temperature Cut-Off Target- Type: Number ID: 18

Device Temperature- Type: Sensor ID: 19

LCD Brightness- Type: Number ID: 102

DeFlanko commented 1 year ago

Almost a year later -- i just discovered this issue being reported -- i too have this fan. @ghost -- were you ever able to set the fan from Standard to DP on the Tuya IoT site?

DeFlanko commented 1 year ago

OHHHHH i understand this now.... For Future reference.

image

DeFlanko commented 1 year ago

how and where did you set these: Temperature Cut-off Switch- Type: Switch ID: 101

Temperature Cut-Off Target- Type: Number ID: 18

Device Temperature- Type: Sensor ID: 19

LCD Brightness- Type: Number ID: 102