current is in Ampere, consumption in W
Screenshots made in Development tools > States
So I get my switch with the attributes like you have in step 1. Did you create a custom entity to get what you have in step 2 (when setting up the tuya device, and then using in my case DP 19) or how did you get that? I of course need a sensor to pass to the Integration for the last step right?
(Still new at HA and read so many guides, but once it comes to practical implementation, still getting stuck )
Could you first show me how you ‘switch’ shows in devtools/states? I am not asking to do the same as I di as I donot have the same device…I just looked at the figures and knew then to decide which is which.
State of one that’s already added to localtuya, and one that I hadn’t added to show the DPs. 26 is 0 (and none show currents, etc now since there’s nothing running on them).
At least you have values…others apparently not. From the switch one you would have to create 2 sensors as per my example, one to extract the consumption from attribute into state value. The other is the integration sensor that keeps statistics and shows up in the energy dashboard.
And how do I create this sensor? While adding the device to localtuya or some other way?
[Edit]
I tried adding the device again, made a Switch and one Sensor on the (what I think is) the _current_consumption DP.
Then I used the sensor with the same Integration settings as you had in your yaml, but I get “unknown” as a state, see below:
[Edit 2] - Seems I got it working with the settings below. I just had to wait for the data to aggregate I think. I think the problem with the other sensor is with how frequently the socket measures, added a comment here about that.
It requires time to generate statistics data indeed. So I hope it is now all fine, I will de-link from this post
Thanks for this… Is there a way to get local tuya / homeassistant to report the energy usage (kWh) ? I can see the Dip id on Tuya IOT portal but local tuya only have the 3 attributes.
Anyone managed to integrate in local-tuya Aubes smart switches? They are really cheap on Aliexpress and they work very good. You can get them with or without power monitoring (be careful when ordering!).
But the problem is that I can not get them working in local-tuya (they work throug official tuya integration).
When added, you need to manually select protocol 3.1 or 3.3. It works only with 3.3, but also in this case you get the response, that none of DPS is available. I tried to manually added a few, when adding DPS 1, you get the switch in HA, but is “unavailable”.
Cross posted
Local Tuya Novostella Flood - No dp_id from API explorer
Anyone ever seen when API explorer does not return dp_id? Can’t figure out even primary switch to start off.
There is local-tuya fork that is supposed to work also with 3.4
I attached 18, 19 & 20 via the integration and grab them individually via template sensors.
Current needed to be divided by 1000 to get the value in Amps.
Anyone knows what the other values are and how to expose them to Home Assistant?
DPS [1] VALUE [True]
DPS [9] VALUE [0]
DPS [18] VALUE [32] - Сurrent
DPS [19] VALUE [32] - Power
DPS [20] VALUE [2367] - Voltage
DPS [21] VALUE [1]
DPS [22] VALUE [691]
DPS [23] VALUE [33766]
DPS [24] VALUE [20628]
DPS [25] VALUE [2030]
DPS [26] VALUE [0]
DPS [38] VALUE [memory] - Relay Status [off; on; memory]
DPS [40] VALUE [relay]
DPS [41] VALUE [False] - Lock
DPS [42] VALUE []
DPS [43] VALUE []
DPS [44] VALUE []
Hi @Brocks I am getting the same “non-mobile devices” problem when I am trying to link my app account with my developer account. How did you fix it?
9 - countdown timer
My Tuya devices are on a separate VLAN, how can I get Local Tuya to scan for those?
I was having the same issue, I cound’t write 0.001 directly.
The way I did it was to type 0.1 first and then add the extra zeros as needed.
i managed to find device id, but how to obtain the lokal Key?
please can you help
Hi before i install the local Tuya does my smart life app still work or does this remove the smart life apps control of my devices?