Fronius


The fronius sensor will poll a Fronius solar inverter, battery system or smart meter and present the values as sensors (or attributes of sensors) in Home Assistant.

Configuration

To enable this sensor, add the following lines to your configuration.yaml file:

sensor:
  - platform: fronius
    resource: FRONIUS_URL
    monitored_conditions:
    - sensor_type: inverter

Configuration Variables

resource

(string)(Required)

The IP address of the Fronius device

monitored_conditions

(list)(Required)

Conditions to display in the frontend

type

(string)(Required)

The kind of device, can be one of “inverter”, “storage”, “meter”, or “power_flow”

scope

(string)(Optional)

The device type for storage and inverter, can be either “device” or “system”

Default value:

device

device

(Optional)

The id of the device to poll

Default value:

“1” for inverters and “0” for other devices such as storages in compliance with Fronius Specs

Examples

When including more of the components that one Fronius device offers, a list of sensors that are to be integrated can be given like below.

sensor:
  - platform: fronius
    resource: FRONIUS_IP_ADDRESS
    monitored_conditions:
    - sensor_type: inverter
      device: 1
    - sensor_type: meter
      scope: system
    - sensor_type: meter
      device: 3
    - sensor_type: storage
      device: 0
    - sensor_type: power_flow

Sensors configuration

To extract more detailed values from the state of each integrated sensor and to circumvent undefined values, it is recommended to use template sensors as an interface:

- platform: template
  sensors:
    electricity_inverter1_power_netto:
      unit_of_measurement: 'W'
      value_template: >-
        {% if states.sensor.fronius_1921684247_inverter_1.attributes.power_ac is defined -%}
          {{ states_attr('sensor.fronius_1921684247_inverter_1', 'power_ac') | float | round(2) }}
        {%- else -%}
          0
        {%- endif %}
    electricity_autonomy:
      unit_of_measurement: '%'
      value_template: >-
        {% if states.sensor.fronius_1921684247_power_flow.attributes.relative_autonomy is defined -%}
          {{ states_attr('sensor.fronius_1921684247_power_flow', 'relative_autonomy') | float | round(2) }}
        {%- else -%}
          0
        {%- endif %}