[energy]Can get Solar Production to work in the Dashboard

I’m using a older type of Inverter which only communicate through RS485 with a Linux commandline tool.
I’m trying to get the sensor working, where I use a Python script to push the commandline data to MQTT, catch that with a HA MQTT sensor and convert that sensor with a Template Sensor so I can set last_reset and such attributes.
The MQTT data is received by HA and I can convert that sensor with the needed attributes to a modern Template Sensor, but still I don’t see any solar data showing up in the energy dashboard.

No I’m focussing on the data I receive.
Should it be the current solar power produced by the inverter of a cum. daily total or a overall inverter total?

  • Current Power: 1,153kW
  • Daily Production: 13,542kWh
  • Overall Production: 34123,200kWh

And should it be 1,153kW or 1.153kW (notice the " . " or " , ")?
And should is a .3float be forced or is 1,100kW and 1,1kW of 1.100kW and 1.1kW in all cases working?

Totally lost and can’t find any docs. on how it should or must work…

very, VERY, VERRRRRY odd… Was very annoyed about the fact I couldn’t get it to work and when I came back to the dashboard data showed up :smiley: :smiley: :smiley:
image
This is the sensor config which is working for me :slight_smile:

  - sensor:
      - name: "solarliveproduction"
        unit_of_measurement: "kWh"
        state_class: measurement
        device_class: energy
        attributes:
          last_reset: "1970-01-01T00:00:00+00:00"
        state: "{{ '{:.3f}'.format((states('sensor.liveproduction')|float)/1000|float)}}"

The ‘sensor.liveproduction’ is in Wh, so I make it a float, divide by 1000 to get kWh and then to be safe again convert it to float.
‘{:.3f}’.format is forcing it to be a 3 decimal float.

Still getting very strange results.
Can somebody help me with this?
Do I need a sensor with actual power(Watt) value or daily harvested energy (kWh) value or … ?