Energy consumption with Tasmota power monitoring plug

Hello,

I have two Nous A1 power monitoring plugs containing Tasmota v 10 by default.
I was able to integrate them in Home Assistant using Mosquitto and - besides the name and MQTT-user settings - default options of the Tasmota devices.
Now I see 40 new entities in the integration section in Home assistant.
I can see an entity for the daily energy consumption as well as for the total energy consumption.
However, when I want to integrate the energy consumption in the Energy Dashboard, I can only find the total energy consumption, which is wrong. I need to integrate the daily energy consumption, that doesn’t appear.

What can I do, to be able to add the daily energy consumption in the Energy Dashboard?

1 Like

Just found this discussion on Github.

It seems it has something to do with the used state class of the sensor.
But how could I change this?
I just upgraded one devices to Tasmota 11.0 but the problem remains.

ok, I think I managed it by my own.
I created a template sensor that reads the value of the Tasmota daily sensor and that seems to solve the problem.

template:
  - sensor:
      - name: "Dryer daily consumption"
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        state: "{{ states('sensor.tasmota_a_energy_today')|float}}"
1 Like

Is there a simpler solution for this ?
I mean creating sensors for dozens of devices is not very user friendly :smiley:

Thanks

I don’t know. It looked like the most simple way to me, as I can’t change how the Tasmota device is working. In my case it were only two devices, meaning two entries.
So that wasn’t huge amount of effort.

The topic is a bit older but just as a short update - I’ve flashed v12.1.1 onto my devices and found that the required data is still not available.

Would it make sense or would it be easier to flash the devices with ESP home? Is the information available there - or at least more easy to integrate on the device level?

Strange i have lots of tasmota plugs and the ‘today’ energy has appeared with the right state_class of total increasing so it shows on the energy dashboard. I think it started working a few days ago.

Hello @roberreiter , Have you put this piece of code in to configuration.yaml ?

yes,
works fine so far

1 Like