For those guys who are looking for a working solution to give the Deye Microinverter e.g. 600W or 800W a zero feed-in, I would like to share my template & automation here:
What do you need?
Deye Microinverter
Solarman integration in Home Assistant
Energymeter e.g. Shelly pm between Inverter & Grid
Shelly Integration in Home Assistant
Energymeter on your Grid e.g. Esp32 with Tasmota and IR Read Dongle to get the Current consumption in Watt from the Grid in realtime.
Make a custom template “Nulleinspeisung” (zero feed-in) under devices & services → helper:
{# set your max Power of your Inverter in Watt: #}
{% set maxInverterPower = 800 %}
{# set your max Inverter Regulation e.g. 100 or max 120 in percent: #}
{% set maxInverterRegulation = 100 %}
{# If your Inverter is making an offset, you can change it here in Watt: #}
{% set inverterPowerOffset = 0 %}
{# Set here your min amount of your base load in your house in Watt: #}
{% set minSolarLimit = 100 %}
{# Here can you change the Zero Point goal e.g. -5, o or +10 in Watt: #}
{% set zeroPointGridAdj = -5 %}
{% set newSolarLimit = 0 %}
{% set newRegulationLimit = 0 %}
{# Put in your current Grid sensor in Watt: #}
{% set curGridUsage = states('sensor.tasmota_stromzahler_strom_power_curr') | float * -1 | replace('W','') | int %}
{#Put in your current Solarpower sensor in Watt e.g. a shelly 2pm (the inverter sensor is too lazy): #}
{% set curSolarProd = states('sensor.solaranlage_solar_leistung_power') | float (0) | replace('W','') | int %}
{% set newSolarLimit = (curSolarProd - (curGridUsage + zeroPointGridAdj)) %}
{% if newSolarLimit <= minSolarLimit %}
{% set newSolarLimit = minSolarLimit %}
{% elif newSolarLimit >= maxInverterPower %}
{% set newSolarLimit = maxInverterPower %}
{% endif %}
{% set newRegulationLimit = ((newSolarLimit * maxInverterRegulation) / (maxInverterPower - inverterPowerOffset)) %}
{{ newRegulationLimit | round (0) }}
Make an automation “Nulleinspeisung” (zero feed-in) under config → automations & scenes:
der Helper wird folgendermaĂźen eingetragen: Helper-> Create helper->Template->Template sensor, wobei der Code bei State template eingetragen wird (geht mit copy-paste) und hier bei Template options angepasst werden kann:
hey there, since there is a new HACS integration of Solarman and the “writing action” in the scripts above my posts is depricated, here is my acually version of the automation script which use the new Deye-Sensors:
Its now very easy to handle. Have fun
Hallo, erst mal danke fĂĽr die Beschreibung des Templates.
Weiss jemand ob man den Wert “Solarman Active Power Regulations” beliebig oft im Deye ändern kann? Bei z.B. einem Wechselrichter von APsystems EZ1-M wird der Werte in einen Flash Speicher geschrieben wird der nur eine begrenzte Zahl von Schreibzyklen hat.