I need some MQTT help seting up flashed growatt wifi x

Hi, I’ve used the official and then HACS integration for growatt solar, but in the last couple of months growatt started blocking connections and I had to make changes. First I tried grott, but my USB dongle died while trying to update via the shine phone app, so I had to flash the ShineWifiX with this firmware:

https://github.com/otti/Growatt_ShineWiFi-S

I got it working with MQTT, but I need to make some changes because my unit turns off when there is no power generated from solar and I do not get any updates from the ShineWifiX dongle. The TotalGeneratedEnergy is ok, but in the TodayGenerateEnergy I want to see the last known generated value to be seen up until midnight and then reset to 0,0 also in the L1ThreePhaseGridVoltage should reset to 0 when the unit turns off.

Edit:
Also when the unit turns off the energy dashboard reads 0 value from the TodayGenerateEnergy, but on a dashboard as an entity value I see the correct number.

  sensor:
     - state_topic: "energy/solar"
       name: "Panele góra całkowita"
       unit_of_measurement: "kWh"
       value_template: '{{ float(value_json.TotalGenerateEnergy) | round(1)  }}'
       json_attributes_topic: "energy/solar"
       device_class: energy
       state_class: 'total_increasing'    
       last_reset_topic: 'energy/solar'
       last_reset_value_template: '1970-01-01T00:00:00+00:00'
       payload_available: 1 # you might need to adapt this
       availability_mode: 'latest'
       availability_topic: "energy/solar"
       availability_template: '{{ value_json.InverterStatus }}'
     - state_topic: "energy/solar"
       name: "Panele góra dzisiaj"
       unit_of_measurement: "kWh"
       value_template: '{{ float(value_json.TodayGenerateEnergy) | round(1)  }}'
       json_attributes_topic: "energy/solar"
       device_class: energy
     - state_topic: "energy/solar"
       name: "Panele góra moc"
       unit_of_measurement: "W"
       value_template: '{{ float(value_json.OutputPower) | round(1)  }}'
       json_attributes_topic: "energy/solar"
       device_class: energy
     - state_topic: "energy/solar"
       name: "Panele góra V"
       unit_of_measurement: "V"
       value_template: '{{ float(value_json.L1ThreePhaseGridVoltage) | round(1)  }}'
       json_attributes_topic: "energy/solar"
       device_class: power