I have fixed the warnings you have mentioned.
for live (my suggestion / correction):
Production : Kostal PIKO Total DC Input → this is the DC power that is currently coming from your solar panels to your inverter. This is not what the inverter produces but what is available for converting.
If you want to visualize what falls out off your inverter into your grid you have to use Kostal PIKO Grid Output Power. I am displaying this as “Available DC Input”.
This is how it looks like on my inverters webinterface:
1.9kW is the DC Input
1.8 is the Grid Output Power
BTW: I have renamed Kostal PIKO Total DC Input to Kostal PIKO Current DC Input because it was misleading with the “Total”.
Output Inverter /Grid output :Kostal PIKO Grid Output Power
Consuption Self Consumption : Kostal PIKO Current Self Consumption (how does this one differ from Kostal PIKO Current Self Consumption? I think there are two sensors for the same value, is that possible?)
Input from Grid : need 83886848 → that is Kostal PIKO Home Consumption Grid
For day :
Production Solar : Kostal PIKO Yield Day
Consumption from Solar : Kostal PIKO Own Consumption Day
Home Consumption : Kostal PIKO Home Consumption Day
These two are not provided by your inverter, or have you found it somewhere in the webinterface?
Total from Grid : not found → it is not even easy to calculate this from the available Kostal PIKO Home Consumption Grid (83886848) sensor…
Out to Grid : Kostal PIKO Yield Day - Kostal PIKO Own Consumption Day ? → yeah - that should work.
You are missing state_class: total_increasing in your template sensors.
platform: template
sensors:
kostal_outputgrid:
friendly_name: “Kostal Piko Output Grid day”
unit_of_measurement: “kWh”
state_class: total_increasing
device_class: energy
value_template: “{{ states(‘sensor.kostal_piko_yield_day’) |float - states(‘sensor.kostal_piko_own_consumption_day’) | float }}”
kostal_inputgrid:
friendly_name: "Kostal Piko Input Grid day"
unit_of_measurement: "kWh"
state_class: total_increasing
device_class: energy
value_template: "{{ states('sensor.kostal_piko_home_consumption_day') |float - states('sensor.kostal_piko_own_consumption_day') | float }}"
@bedman Maybe the output to grid and total from grid thing is something you want to consider in your integration and provide it automatically as sensor?
BTW feel free to copy and of my code and use it in our integration.
Looks like we are now on a good track and have found all the display / associatation issues in my code.