Wrong valua's energy dashboard

hello everyone, i have setup the energy dashboard with solar, battary_sim but i get strange valuas by the simulated_sensor input (Grid electricity).

see screenshot:
image

This is happening when i have installed the SIM_Battery and configured.

config of the energy:

image

for the grid i use the Battery_simulated sensor and ther it is going wrong i think.

The calculation of Battery_simulated sensor is not right i think.

Sorry but i’am an beginner so when you need more information please ask…

little update.

i have fully deleted “battery_sim”

Downloaded again and install it again.

the followhing compenents are used.

energy meter 3 fase (SDM630) reading out trough Modbus
Battery-sim from HAC dowloaded and used the BYD HVM22.1 bat (this is simulated)
Inverter Fronius symo 7.03 M

When i install everything wihout the sim_battery then is working evrything fine.

when i install the sim-battery then i get for the import an 2 times higer energy valua as what it official will be.

configuration:
energy board config for import i used the simulated Import of my SDM630
“battery_sim: BYD Battery Box HVM 22.1kWh - simulated_sensor.sdm630_import_wh_since_last_reset_2”

for export i used the simulated Export of my SDM630
“battery_sim: BYD Battery Box HVM 22.1kWh - simulated_sensor.sdm630_export_wh_since_last_reset_2”

when i check the import energy valuas, the simulated valuas are 2 times higher than the official directly from the energy meter SDM630.

Did anyone anny idea about this.

I have also setup an scan_interval of 120sec for tthe readout of the Import/export but was also not helping.
see config:

modbus:
  - name: SDM630
    type: serial
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    
    delay: 0
    message_wait_milliseconds: 30
    timeout: 5
    
    sensors:
      - address: 72
        scan_interval: 120                                                #2min interval ivm foutiefe battery weergave
        data_type: float32
        input_type: input
        name: sdm630_Import Wh since last reset
        unique_id: "sdm630_Import_Wh_since_last_reset"
        precision: 2
        slave: 1
        device_class: 'energy'
        unit_of_measurement: 'kWh'
        state_class: 'total_increasing'
      - address: 74
        scan_interval: 120                                                #2min interval ivm foutiefe battery weergave
        data_type: float32
        input_type: input
        name: sdm630_Export Wh since last reset
        unique_id: "sdm630_Export_Wh_since_last_reset"
        precision: 2
        slave: 1
        device_class: 'energy'
        unit_of_measurement: 'kWh'
        state_class: 'total_increasing'
       

and than the log of the battery-sim:

2025-01-16 15:37:33.627 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery update complete. New Charge level: (0.0)
2025-01-16 15:37:33.627 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10590.7 kWh => 10590.79 kWh = Δ 0.09000000000014552 kWh
2025-01-16 15:39:33.634 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10590.79 kWh => 10590.88 kWh = Δ 0.08999999999832653 kWh
2025-01-16 15:39:33.634 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh), Size: (22.08)kWh, Import: (0.17999999999847205), Export: (0.0), Initial charge level: (0.0) .... Timings: 1737038373.634183 = Now / 1737038253.627175 = Last Update / 120.00700783729553 Time (sec).
2025-01-16 15:39:33.634 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery normal mode.
2025-01-16 15:39:33.634 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery update complete. New Charge level: (0.0)
2025-01-16 15:39:33.634 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10590.79 kWh => 10590.88 kWh = Δ 0.08999999999832653 kWh
2025-01-16 15:41:33.630 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10590.88 kWh => 10590.97 kWh = Δ 0.09000000000014552 kWh
2025-01-16 15:41:33.630 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh), Size: (22.08)kWh, Import: (0.17999999999847205), Export: (0.0), Initial charge level: (0.0) .... Timings: 1737038493.6308124 = Now / 1737038373.634183 = Last Update / 119.99662947654724 Time (sec).
2025-01-16 15:41:33.630 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery normal mode.
2025-01-16 15:41:33.631 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery update complete. New Charge level: (0.0)
2025-01-16 15:41:33.631 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10590.88 kWh => 10590.97 kWh = Δ 0.09000000000014552 kWh
2025-01-16 15:43:33.641 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10590.97 kWh => 10591.05 kWh = Δ 0.07999999999992724 kWh
2025-01-16 15:43:33.641 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh), Size: (22.08)kWh, Import: (0.17000000000007276), Export: (0.0), Initial charge level: (0.0) .... Timings: 1737038613.6417265 = Now / 1737038493.6308124 = Last Update / 120.01091408729553 Time (sec).
2025-01-16 15:43:33.641 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery normal mode.
2025-01-16 15:43:33.642 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery update complete. New Charge level: (0.0)
2025-01-16 15:43:33.642 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10590.97 kWh => 10591.05 kWh = Δ 0.07999999999992724 kWh
2025-01-16 15:45:33.636 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10591.05 kWh => 10591.14 kWh = Δ 0.09000000000014552 kWh
2025-01-16 15:45:33.636 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh), Size: (22.08)kWh, Import: (0.17000000000007276), Export: (0.0), Initial charge level: (0.0) .... Timings: 1737038733.636606 = Now / 1737038613.6417265 = Last Update / 119.99487948417664 Time (sec).
2025-01-16 15:45:33.636 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery normal mode.
2025-01-16 15:45:33.637 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery update complete. New Charge level: (0.0)
2025-01-16 15:45:33.637 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10591.05 kWh => 10591.14 kWh = Δ 0.09000000000014552 kWh
2025-01-16 15:47:33.631 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10591.14 kWh => 10591.23 kWh = Δ 0.09000000000014552 kWh
2025-01-16 15:47:33.631 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh), Size: (22.08)kWh, Import: (0.18000000000029104), Export: (0.0), Initial charge level: (0.0) .... Timings: 1737038853.63135 = Now / 1737038733.636606 = Last Update / 119.9947440624237 Time (sec).
2025-01-16 15:47:33.631 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery normal mode.
2025-01-16 15:47:33.631 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) Battery update complete. New Charge level: (0.0)
2025-01-16 15:47:33.631 DEBUG (MainThread) [custom_components.battery_sim] (battery_sim: BYD Battery Box HVM 22.1kWh) sensor.sdm630_import_wh_since_last_reset_2 Import: 10591.14 kWh => 10591.23 kWh = Δ 0.09000000000014552 kWh

I have done again an full reinstal and use an other card name and now it lookes fine.
I don’t know what the problem was but it is solved it self.