Closed realthargor closed 1 year ago
Because I was lazy at the time, I just configured a utility meter with daily reset for the total consumption.
You can also try setting up an automation that writes those registers on state change but IMO such logic would be better suited for the integration code itself instead of an automation glued on top
https://neobiker.de/wiki/DEYE_Wechselrichter A Deamon is set up there, which writes the current date into register 22 every day as soon as the inverter goes online.
The problem with the implementation in Home Assistant is that the power remains "frozen" after the inverter is switched off, e.g. at 4 W. With the use of a template sensor (using /config/sensor.yaml) this can be worked around (power below 4 W for longer than 7.5 min (450 s) [because 5min is the inverter's time interval] are set to zero):
# Template sensor for values of solargen (active_power > 0)
power_solargen:
friendly_name: "Power Solargen"
unit_of_measurement: 'W'
value_template: >-
{% if (states('sensor.solarman_total_ac_output_power_active')|float) < 4 and (as_timestamp(now()) - as_timestamp(states.sensor.solarman_total_ac_output_power_active.last_changed)) > 450 %}
{{ 0 }}
{% elif (states('sensor.solarman_total_ac_output_power_active')|float) >= 4 %}
{{ states('sensor.solarman_total_ac_output_power_active')|float }}
{% else %}
{{ 0 }}
{% endif %}
availability_template: "{{
[ states('sensor.solarman_total_ac_output_power_active')
] | map('is_number') | min
}}"
@Hypfer Thanks for your great documentation on this!
The one thing I'm a bit unclear on is how to get Yield today working:
Is this something homeassistant can do by setting the registers via modbus if the device comes online? Do you have the config for this and can you publish it?