I can not assign error message

Hello everyone,
I can’t do anything with this error message. I’ve searched the forum but haven’t found anything.
Fehlermeldung:

Logger: homeassistant.config
Source: config.py:982
First occurred: 13:04:56 (1 occurrences)
Last logged: 13:04:56

Invalid config for [template]: [template] is an invalid option for [template]. Check: template->template. (See ?, line ?).

Home Assistant runs on Windows, Virtual Box

Home Assistant 2023.2.5
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230202.0 - latest

I’m an absolute novice.
I am grateful for any help.

Excuse my Google English

greeting
Wolfgang

Share the template: section of your configuration.yaml file

1 Like

Hello Tom, thanks for your help.

/config/configuration.yaml

Loads default set of integrations. Do not remove.

default_config:

recorder:
db_url: mysql://homeassistant:xxxxxxxxxxx@core-mariadb/homeassistant?charset=utf8mb4
commit_interval: 1
purge_keep_days: 2000

Load frontend themes from the themes folder

frontend:
themes: !include_dir_merge_named themes

Text to speech

tts:

  • platform: google_translate

#Configuration.yaml - Auslagerung
template: !include template.yaml

#----------------------------------------------------------
/config/template.yaml

wasserzaehler

template:
sensor:
name: “Wasserverbrauch_ESP”
device_class: water
unit_of_measurement: “m³”
state_class: “total_increasing”
icon: “mdi:water-percent”
accuracy_decimals: 3
lambda: |-
return id(total_pulses) * 0.01;

Please edit your post and format it correctly:

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Post your configuration.yaml again then make sure there is a blank line in the top and bottom.
Then mark the entire text inclusive the two blank lines and click the </> icon in the top of the text editor and then post it.

Next do the same for your template.yaml file.

1 Like

Better if they edit their post as Tom asked, rather than re-posting it all.

1 Like

Images of text are a horrible thing, but remove the second line of template.yaml, and remove the first two spaces of every line in that file.

1 Like

configuration.yaml


# Loads default set of integrations. Do not remove.
default_config:

recorder:
  db_url: mysql://homeassistant:xxxxxxxxxxxxcore-mariadb/homeassistant?charset=utf8mb4
  commit_interval: 1
  purge_keep_days: 2000
  

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes


# Text to speech
tts:
  - platform: google_translate

#Configuration.yaml - Auslagerung
template: !include template.yaml

template.yaml

# wasserzaehler
  template:
  sensor:
    name: "Wasserverbrauch_ESP"
    device_class: water
    unit_of_measurement: "m³"
    state_class: "total_increasing"
    icon: "mdi:water-percent"
    accuracy_decimals: 3
    lambda: |-
     return id(total_pulses) * 0.01;

remove the second line of template.yaml, and remove the first two spaces of every line in that file.

You don’t need (and don’t want) template: in that file, and you’ve got too many spaces. It should look like

# wasserzaehler
sensor:
  name: "Wasserverbrauch_ESP"
  device_class: water
...
1 Like

True. I did not see Tom’s suggestion when I posted mine. Guess it was a dirty write. :wink:

1 Like

Thank you so much. the error message is finally gone.
Please excuse my ignorance in the forum.
Greetings Wolfgang