Energy Grid and Modbus

Hey folks,

I have an energy system here that measures all inputs, outputs and pv related consumptions and productions. I can query that via modbus and I do get correct information out of it. Example modbus configuration:

      - name: E3DC power consumption
        unit_of_measurement: W
        address: 40071
        device_class: power

Like I said, this works and I do use this for automations like create hot water if batteries are full and I am wasting energy into the grid. Now for some time now there is this fancy new power dashboard that requires long term statistics. I created these extra modbus entries:

      - name: 'Power from Grid'
        unit_of_measurement: "kWh"
        address: 40073
        data_type: uint16
        scale: 0.001
        precision: 3
        scan_interval: 20
        device_class: energy
        state_class: measurement
      - name: 'Power from Solar'
        unit_of_measurement: "kWh"
        address: 40067
        data_type: uint16
        scale: 0.001
        precision: 3
        scan_interval: 20
        device_class: energy
        state_class: measurement

After a HA restart they are present in the system (both) but only one of hose (From Grid) shows up in the selection box for the energy dashboard. The “from Solar” does not show up; even tho the configuration is the very same and the value is also correct.

Adding the “From Grid” to the Energy Dashboard is accepted, but HA is complaining that last_reset is missing. If I add “last_reset: none” or “last_reset: 0” to the first entity, configuration check fails:

Invalid config for [modbus]: [last_reset] is an invalid option for [modbus]. Check: modbus->modbus->0->sensors->0->last_reset. (See /config/configuration.yaml, line 13).

So it is not working without last_reset but failing configuration with the setting? The value in all those readings is the current production/consumption (measurement); its not a counter thats increasing.

So my two questions are:

  1. Why does the Solar Production not show up as a valid sensor in the Energy Dashboard?
  2. What am I doing wrong with the consumption?

Thank you all for any help! :slight_smile:
-Chris

total_increasing

Really? Even though its totally not total increasing but a measurement?