
* Documentation for Fronius sensor component * Update fronius description * Fix templating error * Update doc according to new implementation * Update configuration description * Fixes * Update source/_components/fronius.markdown Co-Authored-By: nielstron <n.muendler@web.de> * Update source/_components/fronius.markdown Co-Authored-By: nielstron <n.muendler@web.de> * Remove last line * Simplify example * Escape yaml templates * Remove "token" that cannot start any token according to deploy * Rework description * Fix configuration strings * Fix configuration look * ✏️ Tweaks * ✏️ Tweak * Correct documentation * Change fronius ip to fronius url * ✏️ Tweak * ✏️ Use `state_attr()`
2.8 KiB
title, description, ha_category, logo, ha_iot_class, ha_release
title | description | ha_category | logo | ha_iot_class | ha_release | ||
---|---|---|---|---|---|---|---|
Fronius | Instructions on how to connect your Fronius Inverter to Home Assistant. |
|
fronius.png | Local Polling | 0.96 |
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 %} resource: description: "The IP address of the Fronius device" required: true type: string monitored_conditions: description: "Conditions to display in the frontend" required: true type: list keys: type: description: "The kind of device, can be one of "inverter", "storage", "meter", or "power_flow"" required: true type: string scope: description: "The device type for storage and inverter, can be either "device" or "system"" required: false type: string default: "device" device: description: "The id of the device to poll" required: false default: ""1" for inverters and "0" for other devices such as storages in compliance with Fronius Specs" {% endconfiguration %}
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:
{% raw %}
- 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 %}
{% endraw %}