Homeassistant integration file 2 times

Hallo
as log as i had only the windspeed in the configuration.yaml
everything was fine. After i added Strompreis the Windspeed
disappeared and only Strompreis is available. Can ynone help me
on this ?

Best regards
Thomas Guettler

sensor:
platform: file
name: Windspeed
file_path: /config/sensor-data.txt
value_template: ‘{{ value.split(“,”)[1] }}’
unit_of_measurement: “km/h”

platform: file
name: Strompreis
file_path: /config/strompreis-data.txt
value_template: '{{ value.split(":")[1] }}'
unit_of_measurement: "Cent"
  • Core 2024.5.2
  • Frontend 20240501.1

Please format your code (all your code) correctly.

We can’t tell you if you have indentation issues, plus you’re definitely missing a - before each platform line.

Hallo see fill Configuration.yaml File

Loads default set of integrations. Do not remove.

default_config:

logger:

default: critical

default: error
logs:
custom_components.hacs: fatal
# log level for HA core
homeassistant.core: fatal

#ssl_certificate: /config/fullchain.pem
#ssl_key: /config/privkey.pem

notify:

recorder:
purge_keep_days: 10 # Anzahl der Tage, die Daten aufbewahrt werden sollen

purge_keep_days: 180 # Anzahl der Tage, die Daten aufbewahrt werden sollen

purge_interval: 365 # Intervall in Tagen, wann alte Daten gelöscht werden

Load frontend themes from the themes folder

#frontend:

themes: !include_dir_merge_named themes

frontend:
themes:
happy:
primary-color: pink
accent-color: orange
sad:
primary-color: steelblue
accent-color: darkred

Text to speech

tts:

  • platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
modbus: !include modbus.yaml

tapo:
discovery: true

binary_sensor:
platform: ping
host: 8.8.8.8
name: “Google Ping”
count: 2
scan_interval: 300

 host: 83.236.170.202
 name:  "BMC Ping"
 count: 2
 scan_interval:  300

 host: 192.168.2.23
 name:  "Netgear Ping"
 count: 2
 scan_interval:  300

 host: 192.168.2.223
 name:  "TPLink Ping Zaehlerschrank"
 count: 2
 scan_interval:  300

 host: 192.168.2.205
 name:  "TPLink Ping SAX"
 count: 2
 scan_interval:  300

 host: 192.168.2.210
 name:  "SAX Ping"
 count: 2
 scan_interval:  300

#ssl_certificate: /config/fullchain.pem
#ssl_key: /config/privkey.pem

homeassistant:
allowlist_external_dirs:
- “/config/”

sensor:
platform: file
name: Windspeed
file_path: /config/sensor-data.txt
value_template: ‘{{ value.split(“,”)[1] }}’
unit_of_measurement: “km/h”

platform: file
name: Strompreis
file_path: /config/strompreis-data.txt
value_template: '{{ value.split(":")[1] }}'
unit_of_measurement: "Cent"

#########################################################

SOLAX CLOUD.

#########################################################

#########################################################

END OF CONFIGURATION FILE

######################################################

Best regards Thomas

Hallo oki will test and let you know. Thank you Thomas Guettler

Adding the -

sensor:
- platform: file
name: Windspeed
file_path: /config/sensor-data.txt
value_template: ‘{{ value.split(“,”)[1] }}’
unit_of_measurement: “km/h”

- platform: file
name: Strompreis
file_path: /config/strompreis-data.txt
value_template: '{{ value.split(":")[1] }}'
unit_of_measurement: "Cent"

caused

Indentation error? Try:

- platform: file
  name: Strompreis
  file_path: /config/strompreis-data.txt
  value_template: '{{ value.split(":")[1] }}'
  unit_of_measurement: "Cent"