Energy dashboard (db migration failed) did stop working

Hello,

Yesterday i did a server update, i moved my docker container and files to another system (i have a home assistant drive). Now did my power consumption graph go throug the roof, i think the last value get’s reset.

Also i get no data back.

The last container is fetcht when i did docker-compose up, after that the platform mqtt was not allowed anymore.

Can someone look with me what the problem is? and how i can restore my data?

Greathings christophe

This is my smart meter yml now, i use a d1mini to read data from the p1 port:

mqtt:
  sensor:
  - unique_id: "total_energy_consumption_offpeak" 
    name: "Meterstand verbruik Nacht"
    state_topic: "home/Smartmeter1/1-0:1.8.2"
    value_template: "{{(value | float / 1000) | float(2)}}"
    unit_of_measurement: 'kWh'
    state_class : "total_increasing"
    device_class: 'energy'
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower-export
  - unique_id: "total_energy_consuption_peak" 
    name: "Meterstand verbruik Dag"
    state_topic: "home/Smartmeter1/1-0:1.8.1"
    value_template: "{{(value | float / 1000) | float(2)}}"
    unit_of_measurement: 'kWh'
    state_class : "total_increasing"
    device_class: 'energy'
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower-export
  - unique_id: "total_energy_production_offpeak" 
    name: "Meterstand PV overschot Nacht"
    state_topic: "home/Smartmeter1/1-0:2.8.2"
    value_template: "{{(value | float / 1000) | float(2)}}"
    unit_of_measurement: 'kWh'
    state_class : "total_increasing"
    device_class: 'energy'
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower-import
  - unique_id: "total_energy_production_peak" 
    name: "Meterstand PV overschot Dag"
    state_topic: "home/Smartmeter1/1-0:2.8.1"
    value_template: "{{(value | float / 1000) | float(2)}}"
    unit_of_measurement: 'kWh'
    state_class : "total_increasing"
    device_class: 'energy'
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower-import
  - unique_id: "energy_tarif" 
    name: "Meterstand Tarief"
    state_topic: "home/Smartmeter1/0-0:96.14.0"
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:moon-waning-crescent
  - unique_id: "current_energy_consumption" 
    name: "Meterstand Actueel Verbruik"
    state_topic: "home/Smartmeter1/1-0:1.7.0"
    unit_of_measurement: 'W'
    state_class : "measurement"
    device_class: 'power'
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower
  - unique_id: "current_energy_production" 
    name: "Meterstand Actueel PV overschot"
    state_topic: "home/Smartmeter1/1-0:2.7.0"
    unit_of_measurement: 'W'
    state_class : "measurement"
    device_class: 'power'
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower
  - unique_id: "current_energy_voltage" 
    name: "Meterstand Actueel Spanning"
    state_topic: "home/Smartmeter1/1-0:32.7.0"
    unit_of_measurement: 'V'
    state_class: "measurement"
    device_class: "voltage"
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower
  - unique_id: "current_energy_current" 
    name: "Meterstand Actueel Stroom"
    state_topic: "home/Smartmeter1/1-0:31.7.0"
    unit_of_measurement: 'A'
    state_class: "measurement"
    device_class: "current"
    availability_topic: "home/Smartmeter1/available"
    icon: mdi:transmission-tower

template:
  - sensors:
      meterstand_actueel:
        unique_id: "current_power_consumption" 
        value_template: >- 
          {{ '%0.1f' | format(states('sensor.meterstand_actueel_verbruik') | float(2) -  states('sensor.meterstand_actueel_pv_overschot') | float(2) ) }}
        friendly_name: 'Meterstand Actueel'
        unit_of_measurement: 'W'
        device_class: "power"
  - sensor:
    - name: "Totaal energy gebruik"
      unit_of_measurement: "kWh"
      device_class: "energy"
      state_class: "measurement"
      unique_id: "total_energy_consumption"
      icon: mdi:transmission-tower-export
      state: >
        {% set a = states('sensor.meterstand_verbruik_nacht') | float(2) %}
        {% set b = states('sensor.meterstand_verbruik_dag') | float(2) %}
        {{ (a + b) | round(2) }}
      attributes:
        last_reset: '1970-01-01T00:00:00+00:00'
  - sensor:
    - name: "Totaal energy overschot"
      unit_of_measurement: "kWh"
      state_class: "measurement"
      device_class: "energy"
      unique_id: "total_energy_to_grid"
      icon: mdi:transmission-tower-import
      state: >
        {% set a = states('sensor.meterstand_pv_overschot_nacht') | float(2) %}
        {% set b = states('sensor.meterstand_pv_overschot_dag') | float(2) %}
        {{ (a + b) | round(2) }}
      attributes:
        last_reset: '1970-01-01T00:00:00+00:00'
  - sensor:
    - name: "Totaal energy"
      unit_of_measurement: "kWh"
      state_class: "total"
      device_class: "energy"
      unique_id: "total_energy"
      icon: mdi:transmission-tower-import
      state: >
        {% set a = states('sensor.total_energy_consumption') | float(2) %}
        {% set b = states('sensor.total_energy_to_grid') | float(2) %}
        {{ (a - b) | round(2) }}
      attributes:
        last_reset: '1970-01-01T00:00:00+00:00'

utility_meter:
  daily_energy_offpeak:
    source: sensor.meterstand_verbruik_nacht
    cycle: daily
    net_consumption: true
  daily_energy_peak:
    source: sensor.meterstand_verbruik_dag
    cycle: daily
    net_consumption: true
  weekly_energy_offpeak:
    source: sensor.meterstand_verbruik_nacht
    cycle: weekly
    net_consumption: true
  weekly_energy_peak:
    source: sensor.meterstand_verbruik_dag
    cycle: weekly
    net_consumption: true
  monthly_energy_offpeak:
    source: sensor.meterstand_verbruik_nacht
    cycle: monthly
    net_consumption: true
  monthly_energy_peak:
    source: sensor.meterstand_verbruik_dag
    cycle: monthly
    net_consumption: true
  yearly_energy_offpeak:
    source: sensor.meterstand_verbruik_nacht
    cycle: yearly
    net_consumption: true
  yearly_energy_peak:
    source: sensor.meterstand_verbruik_dag
    cycle: yearly
    net_consumption: true

I see that the data in the database is empty after the update