#energy dashboard shows MWh in stead of kWh

1 messages · Page 1 of 1 (latest)

ornate pasture
#

Hi, im receiving MWh values in my energy dashboard, in stead of kWh. Someone a clue why? Its started after i added the solar panels.
Im receiving the data via the modbus integration:
This is what i have in my configuration.yaml:

modbus: !include modbus.yaml

This is what i have in my modbus.yaml:

- name: GROWATT_MTL
  #RS485to USB voor Growatt MTL 
  type: serial
  baudrate: 9600
  bytesize: 8
  method: rtu
  parity: N
  port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  stopbits: 1


  sensors:
        #3 Growatt
        - name: Growatt_MTL_power
          unique_id: Growatt_MTL_power
          precision: 0
          address: 12
          scan_interval: 10
          input_type: input
          slave: 22
          scale: 0.1
          unit_of_measurement: W
          state_class: measurement
          device_class: power
    
        - name: Growatt_MTL_load
          unique_id: Growatt_MTL_load
          precision: 1
          address: 3
          #scan_interval: 10
          input_type: holding
          slave: 22
          unit_of_measurement: "%" 
          device_class: power
    
    
        - name: Growatt_MTL_total_energy1
          unique_id: Growatt_MTL_total_energy1
          precision: 1
          address: 29
          input_type: input
          slave: 22
          scale: 0.1
          data_type: uint16
          unit_of_measurement: kWh
          state_class: measurement

I made two helpers, Solar Production Power and Solar Production Energy.
The Power helpers has this:
Unit of Measurement = W
{{ states('sensor.growatt_mtl_power') | float(0) }}
Default precision (614)
Entity id = sensor.solar_production_power

Energy:
Unit of Measurement = kWh
{{ states('sensor.growatt_mtl_total_energy1') | float(0) }}
Device class = Energy
State class = total increasing
{{ Preview: Solar production energy 1,419.0 kWh}}

But im getting this in energy dashboard:

static swallow
#

You can see it in your template preview. It says 1419 kWh. So your aolar just went from 0 to 1.4 MWh today

#

You can probably edit the statistics to correct this but I haven't done this so someone else may have to guide you

ornate pasture
#

Yes, correct. Just added it, and this is the value it started off with.
yesterday it was 1413.5,
today 1415.0. (small gap because of of my sensor didnt 'initialise this morning).
So its a total count of kWh..

pulsar plinth
#

It's reporting in such a way that it is reporting that as incremental consumption. Probably some errant glitches to 0.

#

| float(0) <- you don't want to do this.

ornate pasture
#

Remove the (0) then?

ornate pasture
#

These are the values of the sensors. I removed rhe solar sensors/helper, that gives me a normal energy usage and return to grid.

pulsar plinth
ornate pasture
#

No difference, got rid of the (0) in helper Solar production power and energy. Instantly shows MWh.

pulsar plinth
#

It's not going to fix whatever damage you accumulated in the past.

#

If it shows MWh it's because your entity has accumulated 1000+ kWh in the displayed time period.

ornate pasture
#

In the past, i had the growatt integration added, but this was not reliable at all (like the ha documentation said). I removed this, also from the energy dashboard.
Last week i set up a modbus connection, reading out the inverter locally. Now i want to add the values Solar production energy and Solar production power. Power seems fine. But the energy does not.

ornate pasture
#

If i wait for a day, will the energy dashboard, revert to normal, showing kWh?
If i break it down, because it showed a total of 1419 kWh from 0, first time it set it up, ha shows it as MWh. If i read the docs correct, ore then 1000 kWh is MWh, below is kWh. Correct @pulsar plinth ?

unreal verge
#

Why are you creating a template sensor? You should adjust the modbus yaml so the template sensor isn't needed

#
        - name: Growatt_MTL_total_energy1
          unique_id: Growatt_MTL_total_energy1
          precision: 1
          address: 29
          input_type: input
          slave: 22
          scale: 0.1
          data_type: uint16
          unit_of_measurement: kWh
          state_class: total_increasing # changed from measurement
          device_class: energy # added
ornate pasture
ornate pasture
#

does this seem right @unreal verge ?:

        - name: Growatt_MTL_total_energy
          unique_id: Growatt_MTL_total_energy
          precision: 1
          address: 28 
          input_type: input
          slave: 22
          scale: 0.1
          data_type: uint32
          unit_of_measurement: kWh
          state_class: total_increasing
          device_class: energy
          #Ik kijk nu naar adress 28 en 29, energy total high en low samen, door uint32 te gebruiken als data_type 
unreal verge
#

I have no clue about modbus confirmation, but should create a sensor which can be added to the energy Dashboard

ornate pasture
#

To get back on this: on day 2 the energy dashboard started showing normal values.