Is it possible for the ESP8266 text component to store multiple values?

Only entries listed first will be saved.
For example, if a5 is first, it will be saved; others will not.
ESP32 works well. If ESP8266 cannot do this, I will consider replacing it.

esphome:
  name: a123456
  friendly_name: a123456

esp8266:
  board: nodemcuv2
  restore_from_flash: true
# Enable logging
logger:

api:


ota:
  - platform: esphome
    password: "de836ad7616b6ae95980d3026f6d3702"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ld-RFallback Hotspot"
    password: "XuwMXNojqI1z"

captive_portal:

web_server:

text:
  - platform: template
    name: "a5"
    id: a55555
    mode: text
    optimistic: true
    restore_value: true

  - platform: template
    name: "a1"
    id: ip_input1
    mode: text
    optimistic: true
    restore_value: true

  - platform: template
    name: "a2"
    id: a222222
    mode: text
    optimistic: true
    restore_value: true

  - platform: template
    name: "a3"
    id: a333333
    mode: text
    optimistic: true
    restore_value: true

  - platform: template
    name: "a4"
    id: a4444444
    mode: text
    optimistic: true
    restore_value: true




preferences:
    flash_write_interval: 30s

It’s not clear to me what your issue/problem/goal is.
Could you elaborate please?

ESP8266 only has 96 bytes available for restored values. How big is your sensor data?

That’s all the code.

I tried to minimize the number of components used for testing.

Even so, the ESP8266 can only save the first data in the code.

After restarting, it can only save the data in cell A5 of the code.

I entered some values ​​into this text field,

but after restarting, only one of these values ​​is saved.

The pattern is that only the first value in the sequence is saved, which is A5.

1 Like