Custum sensor: where to place the "custom:"?

In the info about the sma converter (https://www.home-assistant.io/components/sensor.sma/) you can find this
“custom sensors can be defined by using the custom section of the configuration.”

Example:

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

Do I have to put this in config.yaml ?

@Faecon Did you find the answer to this question?

Per the page you’d do it like this:

sensor sma:
  - platform: sma
    host: IP_ADDRESS_OF_DEVICE
    password: YOUR_SMA_PASSWORD
    sensors:
      current_consumption: [total_consumption]
      current_power: 
      total_yield: 
    custom:
       yesterday_consumption:
          key: 6400_00543A01
          unit: kWh
          factor: 1000
1 Like

Thank you! :slight_smile: