Tuya - WifiDualMeter Issue (missing entities)

Using LocalTuya I was able to successfully set up the wifi dualmeter… nevertheless, there’s no way to integrate it in “Energy” dashboard.
The sensor entities are set, but when I try to set up the Energy dashboard, they are not proposed.
This guide: Frequently Asked Questions about home energy management - Home Assistant
suggests going to Developer Tools > States to check the entities.
I can’t find anything wrong: i.e.:

sensor.107_reverse_energy_a
107-reverse energy A
2.32	raw_state: 2.32
unit_of_measurement: kWh
device_class: energy
friendly_name: 107-reverse energy A

Very same page suggests also that “state_class” must be total or total_increasing… but I don’t know how to check this, as it’s not reported in Developer Tools > States … any idea?

use customize in configuration.yaml


homeassistant:
  name: Home
  unit_system: metric
  # etc
....

  customize:
    # Add an entry for each entity that you want to overwrite.
    sensor.107_reverse_energy_a:
      state_class: total_increasing
3 Likes

Indeed had to add some code to configuration.yaml (as mentioned by @francisp

homeassistant:
  customize:
    sensor.wifi_dual_meter_forward_energy_a:
      state_class: total_increasing
    sensor.wifi_dual_meter_forward_energy_b:
      state_class: total_increasing
    sensor.wifi_dual_meter_reverse_energy_a:
      state_class: total_increasing
    sensor.wifi_dual_meter_reverse_energy_b:
      state_class: total_increasing
    sensor.wifi_dual_meter_total_forward_energy:
      state_class: total_increasing
    sensor.wifi_dual_meter_total_reverse_energy:
      state_class: total_increasing

2 Likes

Would I want to integrate the dual-meter in the standard “Energy usage” dashboard:

  • as “grid consumption” I set variable 108 (dp_energy_forward_b)
  • as “return to grid” I set variable 109 (dp_energy_reverse)

And this works fine, and I get the diagram of energy consumed or returned to the grid…
But for “solar production” what could I use?
The value should be the difference between dp_energy_forward_a (energy consumed by the load) - dp_energy_forward_b (grid consumption).
But how can I define such a variable?

can you share your complete config with the scaling factors, offsets, etc?

the dual ct monitor works only on protocol 3.5, try a different version of local tuya that supports it. the single ct monitor uses protocol 3.4.

1 Like

Hi. Thank you very for this and to those who contributed to this topic. My dual meter was giving even giving no entity through tuya smart ! Now I can get all of them using this topic. The complete list of mapping is very usefull ! The 2 firsts 1 & 2 were referenced as 130 & 131 in my case.
Kind regards.

is it possible to define an entity that gives me the daily sum of another entity? I need to create a card that displays my daily consumption. Thanks

Thanks for the information, local tuya cannot find PJ-1103A “wifi_dual_meter” automatically.
going to add device, local tuya protocol version 3.5 is not available, cannot be selected. 3.3 or 3.4.
“Entity type selection” does not have “energy” option as platform. I had to choose “sensor”.
Even if the feature appears later, it remains “Unavailable”.
When I proceed with “edit device” in the configuration, even if I enter all the information, it does not proceed as if I have entered a field that I did not fill in.
I’ve been trying but I can’t seem to make any progress.
I would be glad if you can help. Thanks in advance!

1 Like

This has been incredibly helpful. Thank you! Like for @GeoGitHubHA, the Total Forward/Reverse Energy endpoints were 130 and 131 for me. Separately, I configured some end points with scaling factors of 0.0002, .02, etc., to correctly scale 240V readings while the PJ-1103 monitor is powered by 120V (in the United States).

Please @bushwoelie could you share your config code? I cant/dont know how to change the values to see all the items like Hz, Amps, kWh, etc… Please!