Help needed with mqtt sensor for power usage

Hopefully this is the correct location for this. I have a custom python script that gets power usage and pushes that data via mqtt. So now i want to ingest the data as an energy sensor. Attached is what my mqtt data looks like inside mqtt explorer. Im trying to figure out what my sensor should look like. I have the following but doesn’t work most likely due to the datetime piece. Any help would be greatly appreciated.

    - state_topic: "nisc"
      name: "Home Power Usage"
      unit_of_measurement: 'kWh'
      device_class: energy
      state_class: total_increasing