Total dialy consumed. Thanks
Hi Paul,
I am using your configuration for my Fronius inverter. Looks like something is wrong in my config as I get just â0â in the Lovelace view. Looks like you are using the sun.sun variabel for the script. I donât understand the reason for using this. That would mean that after sunset I will always see jsut â0â in the result, is that correct?
Thanks a lot
Been a while since i have played with hass, as i am building a larger homelab with hass in it. If i remember correctly this was used to overcome the error report when the solar wasnât producing. Instead, giving you a reading of 0.
This was well hidden. I came to the same conclusion the hard way though :-).
Two calls is now enough, on for the âCommonInverterDataâ and one for some nice to have values in the âMinMaxInverterDataâ as well.
Great idea, but the unit of measures and the divisions factors are wrong
Thatâs the correct one:
sensor:
- platform: rest
resource: http://192.168.1.26/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Potenza Attuale"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.PAC.Value /1000 | float)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'KW'
force_update: true
- platform: rest
resource: http://192.168.1.26/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Energia Totale Oggi"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.DAY_ENERGY.Value /1000 | float)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'KWh'
force_update: true
- platform: rest
resource: http://192.168.1.26/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Energia Totale Annuale"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.YEAR_ENERGY.Value /1000 | float / 1000)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'MWh'
force_update: true
- platform: rest
resource: http://192.168.1.26/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Energia Totale"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.TOTAL_ENERGY.Value /1000 | float / 1000)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'MWh'
force_update: true
Do you know how can I get ?
- Daily Energy Sent to Newtork (KWh)
- Daily Energy Get from the Network (KWh)
- Daily consumed Energy (KWh)