Configuration YAML Template Syntax

Danke für die Antwort aber damit bin ich wieder bei der Fehlermeldung:

Invalid config for [template]: [entity_id] is an invalid option for [template]. Check: template->sensor->0->entity_id. (See /config/configuration.yaml, line 53).

17:23:08 – (FEHLER) config.py - Die Nachricht ist zum ersten Mal am 15:08:00 aufgetreten und erscheint 27 mal

Invalid config for [template]: [entity_id] is an invalid option for [template]. Check: template->sensor->0->entity_id. (See /config/configuration.yaml, line 53).

17:23:08 – (FEHLER) config.py - Die Nachricht ist zum ersten Mal am 15:07:56 aufgetreten und erscheint 50 mal

Sehe auch gerade: Der Statistik Sensor gehört laut Dokumentation auch nicht ins template: hinein sondern in einen eigenen sensor: Block

sensor:
  - platform: statistics
    name: "Bathroom humidity mean over last 24 hours"
    entity_id: sensor.bathroom_humidity
    state_characteristic: mean
    max_age:
      hours: 24

Nur scheint er bei mir dann einfach nicht auf. Theoretisch müsste es stimmen wie es @SvePu geschrieben hat.

EDIT

OK, hab das Problem gefunden. Weil es der erste Eintrag von sensor: war, musste ich Home Assistant komplett neustarten und rein Reload der configuration yaml erkannte den Eintrag nicht …

Trotzdem Danke euch beiden bzw. vor allem @SvePu der mir ja die korrekte Lösung hingeschrieben hat :smiley: