Hi I have the simplest bit of code running on my ESP8266 board and at one point I defined a number to use elsewhere, I would like it to be restored at power up. I used the restore_value: true
but it just seems to start at its min value the code looks like. Am I missing something?
Thanks
Mark
number:
- platform: template
name: "Number1"
id: number1
optimistic: true
min_value: 0
max_value: 150
step: 1
- platform: template
name: "Number2"
id: number2
optimistic: true
min_value: 20
max_value: 50
step: 1
restore_value: true
You may also need to include the Core item: esp8266_restore_from_flash
in order for restore_value
to work.
1 Like
Did I mention Im not very good
? I just tried esp8266_restore_from_flash
in the header but I get a compiler error, Error: Unknown board ID esp01_1m esp8266_restore_from_flash
Have I put it in the wrong place?
Thanks
``
esphome:
name: esphome-web-deff35
esp8266:
board: esp01_1m
esp8266_restore_from_flash
Enable logging
logger:
Enable Home Assistant API
api:
``
Yes, most likely.
I believe it goes under āESPHomeā, but if you search it in the docs Iām sure thereās an example in there.
Youāll also need to include the ā: trueā after the tag, to make it be valid. See the examples.
1 Like
Thank you
Once I got the syntax correct it started working
This is the header part of the code
esphome:
name: esphome-web-deff35
platform: esp8266
board: esp01_1m
esp8266_restore_from_flash : true
1 Like
It seems to me that now you only accept it in this form
restore_from_flash : true