Esphome text_sensors can only occur once?

Hi
I have several esphome devices. They all include this wifi settings file:

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
  - ssid: !secret teknisk_ssid
    password: !secret teknisk_password
logger:
api:
ota:
sensor:
  - platform: wifi_signal
    name: esp_wifi_${name}
    update_interval: 600s
text_sensor:
  - platform: wifi_info
    ssid:
      name: esp_ssid_${name}
    bssid:
      name: esp_bssid_${name}
    ip_address:
      name: esp_ip_${name}
switch:
  - platform: restart
    name: restart_${name}

Problem: Some of my devices have their own text_sensor settings.
This makes the esp_ip_address etc. sensors disappear, it seems.
The problem doesn’t occur with the other sensors and switches.
What’s wrong, and what can be done?

How do you include this file?
If you don’t use packages currently, then check those out. Packages can include config files that are merged with the info from your main device configuration file.

1 Like

try to exclude more than one spaces. I noticed that it affects. and make it a rule to add id to each entity

1 Like

Thanks! Packages solved my problem. I don’t actually know how or why, but that doesn’t matter. I’ll migrate to packages for all my devices.

1 Like