Tuya LOCAL with energy monitoring and without tuya-convert

Temps are correct now, temp step is valid. But when I tried to change set temp from HA its unavailable and then it returns to previus state. I also tried to fill optional IDs for Max and Min temp (defaullt is 7 and 35), my is 5 and 35 and then thermostat is also in unavailable state. One more question how Can I remove the set ID value field to empty line (delete row data) in config flow without recreating the new entity integration?

Ok,
Thanks

I have a tuya switch 4 gang + 1 FAN. I followed the instructions and able to get the following working

Details - See PIC:

  1. 4 GANG - each of them are switch (1,2,3,4) & also can report Current (DPS=102), Power (DPS=103), Voltage (DPS=104) | (DPS values =1,2,3,4)
  2. FAN - This has 2 components - Switch (5) & Speed Control (Values 1 to 24) - (DPS values=5 for Switch & FAN SPEED = 105)

What works?

  1. Using Tuya-cli able to control / change all the switch/speed individually
  2. Using tuya-local integration :slight_smile:
    a. Switch 1 - Selected as “Switch” thru integration GUI - Works
    b.Switch 2 - Selected as “Switch” thru integration GUI - Works
    c.Switch 3 - Selected as “Switch” thru integration GUI - Works
    d.Switch 4 - Selected as “Switch” thru integration GUI - Works
    e. Switch 5 - Selected as “Switch” to control ON/OFF for fan thru integration GUI - Works
    f. Speed Control - Selected as “FAN” to control speed thru integration GUI - When selecting Low/Medium/High - Turns on Switch1 & Switch 2 - This causes an issue

Any idea how to solve the FAN issue (Currently I have scenes for setting 4 different speed using smartlife app and call them thru the HASS - tuya integration & use the imported scenes using input_select/Automation - functional and works)

However I like the local functionality and was hoping this will get me away from tuya cloud.

Has anyone. been able to get this working?

It’s not possible to unset values yet, I will work on that in due time.

Ok I see, sorry for my impatience :wink:

No worries :wink:

@rospogrigio any insight what I may be doing wrong
my fan speed is from 1 to 24 && not Low medium high
also it is controlled using 2 DPS setting. DPS=5 (on/off) && DPS=105 (Speed 1 to 24)

the current tuya-local fan module is hard coded for dps 2 (fan speed), and dps 8 (oscillate), and only 3 speeds.

I have a fix for the dps 2 problem, and the speed having to be a number (my air purifier has ‘low’/‘medium’/‘high’/‘auto’. ‘auto’ is not supported in Home-assistant, and only 3 fan speeds are currently supported.

The fan platform has not been improved since the re-write, so everything in it is static. It should be made more generic by introducing configuration parameters for things that can vary.

Mmm, that is supposed to work now. Can you enable logging and post what you find in the logs?
Thank you

Edit: oops, I also noticed a bug, please pull updates before you retry


Good day. First thank you for producing/sharing this component.
I’m trying to integrate some zemismart tuya curtains unsuccessfully. Using the following config flow, i can move the curtains with the cover slider, but the arrows for close/open only change the icon status. They dont move the curtain.

this is the config flow i’m using.

Any advise it’s much appreciated.

You are using the same DP (103) for the cover main DP and the Current position, which is wrong. Please send a screenshot of one of the drop-down DPs menu (for example, the one you get when you select “Current Position”). Also, you should try to understand whether your device supports Positioning mode or not.

thank you very much for your prompt reply. I’ve removed the entity and started the initial config flow again. see below

I can confirm that there is position feedback via the tuya app. I can set the cover position to anything in the app slider.

Well, I’d try to use 102 as ID, and use 101 both for current and for Set position (looks strange anyway).
You might need to try both the on_off or open_close commands and see whichever works.
Does it have a backlight? I believe that 103 is the DP related to that.
Let us know how it goes, bye

Created a log, At 18:51 tried to set temp from 23 to 20 C. It gives an error


allright, followed your suggestion and got it to work. The arrows still dont work but the position slider works and the device/entity reports the correct position in % terms.
So I just made a cover template and job done.
pretty much instant action and feedback.

Thank you very much again.

Obvious error:

2020-10-12 18:51:17 DEBUG (SyncWorker_50) [custom_components.localtuya.pytuya] paylod=b'{"devId":"6078740684f3eb51e492","uid":"6078740684f3eb51e492","t":"1602521477","dps":{"target_temperature_dp":200.0}}'

target_temperature_dp should be the actual datapoint index. @rospogrigio Simply missing to look the index up in config before setting the datapoint. How could we both miss that :sweat_smile:

2 Likes

Shit happens :slight_smile: Stay focused :smiley: !

The arrow keys should work in case Open/Close commands are correct. If you tried them both, then maybe we have another one on our hands. I can see that the state of 102 is in upper case, maybe the commands needs to be in upper case too? What do you think @rospogrigio?

Ooops, this is what happens when you test the current temperature but not the set temperature command!!
Gosh @postlund, we’ve been reviewing every comma in the comments and then we miss these things!! I guess we’re a bit tired these days (at least, I am) :sweat_smile::sweat_smile:
Ok will fix it soon!

2 Likes