Configuring a statistics sensor with whatever state_characteristic return "invalid option"

I suppose I made some terrible mistake, but I can’t find. I’m trying to define a statistics sensor.

Statistics - Home Assistant (home-assistant.io)

As of this documentatuin I can use several state_characteristic. But when I try to add a state_characteristic: *whatever* to the sensor I get the error above.

Invalid config for [sensor.statistics]: [state_characteristic] is an invalid option for [sensor.statistics]. Check: sensor.statistics->state_characteristic.

For example:

my_package:

  sensor:

    - platform: statistics
      name: "heating_central_temperature_min_dt1"
      entity_id: sensor.ambient_temperature_4
      state_characteristic: mean
      max_age:
        seconds: 60
      sampling_size: 50
      precision: 1

What version of home assistant are you on?

This was introduced in v2021.12

2 Likes

I’m using 2021.12