Hello,
In my configuration.yaml , I created this statistics sensor :
sensor:
- platform: statistics
name: "Wind max force 10min"
entity_id: sensor.rdc_anemometre_wind_strength
state_characteristic: value_max
max_age:
minutes: 10
I seems to work well, but I want to move it into a dedicated configuration file.
Then in configuration.yaml, I replaced the sensor by this line :
sensor: !include_dir_list sensors/
And I created a file sensors/statistics.yaml. At this step : no sensor but no error.
To add sensor in this file, I tried several things, without success :
platform: statistics
name: "Wind max force 10min"
unique_id: stats.windmax
entity_id: sensor.rdc_anemometre_wind_strength
state_characteristic: value_max
max_age:
minutes: 10
→ Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/sensors/statistics.yaml”, line 2, column 7
- platform: statistics
name: "Wind max force 10min"
unique_id: stats.windmax
entity_id: sensor.rdc_anemometre_wind_strength
state_characteristic: value_max
max_age:
minutes: 10
→ Invalid config for ‘sensor’ at sensors/statistics.yaml, line 1: expected a dictionary ‘’, got [{‘platform’: ‘statistics’, ‘name’: ‘Wind max force 10min’, ‘unique_id’: ‘stats.windmax’, ‘entity_id’: ‘sensor.rdc_anemometre_wind_strength’, ‘state_characteristic’: ‘value_max’, ‘max_age’: {‘minutes’: 10}}]
For sure a silly mistake I did, what’s wrong ?
Thank you.