Daily sensor

Hello Every Body
I don’t understant the use of daily sensor ?
I have sensor.daily_yield with my sma and I try this différent sensor

  daily_energy_2:
    source: sensor.daily_yield
    cycle: daily    
  weekly_energy_2:
    source: sensor.daily_yield
    cycle: weekly
  monthly_energy_2:
    source: sensor.daily_yield
    cycle: monthly
  yearly_energy_2:
    source: sensor.daily_yield
    cycle: yearly

But When I check Daily directly on SMA I have for exemple at his time : 1000wh and for daily.energy_2 I have 0.842kwh
From what i have a difference between this two value ?? And dus other weekly Monthly and yearly are they correct ?
Thanks

What does sensor.daily_yield measure? kW or kWh?

sensor.daily_yield mesure the production of the solar panel of the day the value is in wh

I use

  - platform: template
    sensors:
      daily_energy_2_kwh:
        friendly_name: Daily Energy 2
        unit_of_measurement: 'kWh'
        value_template: "{{  ((states('sensor.daily_energy_2')|float)/1000)  }}"

to transform Wh in KWh

Has it run for a full day yet?

Yes
Yesterday the official SMA application give me for 02/09/2019 – >30.05KWh
The value in sensor.daily_energy_2_kwh for yesterday is --> 29.59KWh

In Influx DB i have the same result:

SELECT max("value") AS "max_value" FROM "homeassistant"."autogen"."Wh" WHERE time > :dashboardTime: AND "entity_id"='daily_yield' GROUP BY time(1d) FILL(null)

for yesterday --> 30.04 KWh

SELECT max("value") AS "max_value" FROM "homeassistant"."autogen"."kWh" WHERE time > :dashboardTime: AND "entity_id"='daily_energy_2_kwh' GROUP BY time(1d) FILL(null)

for yesterday --> 29.59 KWh

Looks like a small margin or error.