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.

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