Bob Igo bd6fb9f1a2 fix for using custom keys (#10045)
Custom keys must be quoted, or else the parser will try to interpret them as numbers.
2019-08-05 16:28:31 +02:00

4.2 KiB

title, description, ha_category, logo, ha_iot_class, ha_release, redirect_from
title description ha_category logo ha_iot_class ha_release redirect_from
SMA Solar WebConnect Instructions on how to connect your SMA Solar Inverter to Home Assistant.
Energy
sma.png Local Polling 0.36
/components/sensor.sma/

The sma sensor will poll a SMA (US) solar inverter and present the values as sensors (or attributes of sensors) in Home Assistant.

This sensor uses the web interface and in order to use it you have to be able to connect to the solar inverter from your favorite web browser.

Configuration

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

# Example configuration.yaml entry
sensor:
  - platform: sma
    host: IP_ADDRESS_OF_DEVICE
    password: YOUR_SMA_PASSWORD
    sensors:
      current_consumption: [total_consumption]
      pv_power:
      total_yield:

{% configuration %} host: description: The IP address of the SMA WebConnect module. required: true type: string ssl: description: Enables HTTPS if set to true, otherwise with false the platform run with HTTP. required: false default: false type: boolean verify_ssl: description: Whether Home Assistant should verify the SSL certificate from the inverter. Self-signed certificates may require false for this sensor to operate properly. required: false default: true type: boolean password: description: The password of the SMA WebConnect module. required: true type: string group: description: The user group, which can be either user or installer. required: false default: user type: string sensors: description: A list of sensors that will be added. The value of the list can include a list of sensor names that will be used as attributes. required: false default: All sensors type: list keys: pv_power: description: Current power generated by the inverter (W). pv_gen_meter: description: Total kWh generated to date (kWh) total_yield: description: Total power yield from solar installation (kWh). daily_yield: description: The yield for today (Wh)

current_consumption:
  description: Power that you are currently drawing, depending on your installation it can be a combination of the inverter and the grid (W).
total_consumption:
  description: Total power consumption (kWh).

grid_power_supplied:
  description: Power supplied (W)
grid_power_absorbed:
  description: Power absorbed (W)
grid_total_yield:
  description: Total power fom the grid (kWh)
grid_total_absorbed:
  description: Total power supplied to the grid

grid_power:
  description: Power supplied by the grid (W)
frequency:
  description: Grid frequency (W)
voltage_l1:
  description: Voltage for phase 1 (V)
voltage_l2:
  description: Voltage for phase 2 (V)
voltage_l2:
  description: Voltage for phase 3 (V)

status:
  description: Status of the solar plant.

your-custom-sensor:
  description: Any sensor name defined in the `custom:` section

custom: description: A dictionary of custom sensor key values and units. required: false type: map keys: key: description: The SMA sensor key. required: true type: string unit: description: Unit. required: true type: string factor: description: Factor. required: false default: 1 type: float {% endconfiguration %}

You can create composite sensors, where the sub-sensors will be attributes of the main sensor. E.g.,

    sensors:
      - current_power: [total_power, total_consumption]

The SMA WebConnect module supports a wide variety of sensors, and not all these have been mapped to standard sensors. Custom sensors can be defined by using the custom section of the configuration. You will need: A sensor name (no spaces), the SMA sensor key and the unit

Example:

   custom:
      yesterday_consumption:
         key: '6400_00543A01'
         unit: kWh
         factor: 1000

Over time more sensors will be added as standard sensors to the pysma library. Feel free to submit additional sensors on that repository.