Hi, I have this very simple stepper made to control a gas heater. I need it to remember its position when AC fails and return again. Can anybody help me?
esphome:
name: calefactor01
platform: ESP8266
board: d1_mini
wifi:
ssid: ‘XXXXX’
password: ‘XXXXX’
Enable logging
logger:
Enable Home Assistant API
api:
password: ‘XXXXX’
services:
- service: control_stepper
variables:
target: int
then:
- stepper.set_target:
id: my_stepper
target: !lambda ‘return target;’
ota:
password: ‘XXXXX’
web_server:
port: 80
auth:
username: XXXXX
password: XXXXX
stepper:
nickrout
(Nick Rout)
May 29, 2021, 10:34pm
2
esphome:
name: calefactor01
platform: ESP8266
board: d1_mini
esp8266_restore_from_flash: true
wifi:
ssid: XXXX
password: XXXX
logger:
api:
password: XXXX
services:
- service: control_stepper
variables:
target: int
then:
- stepper.set_target:
id: my_stepper
target: !lambda `return target;`
ota:
password: XXXX
web_server:
port: 80
auth:
username: XXXX
password: XXXX
stepper:
- platform: uln2003
id: my_stepper
pin_a: D0
pin_b: D1
pin_c: D2
pin_d: D3
max_speed: 250 steps/s
sleep_when_done: true
acceleration: inf
deceleration: inf
Sorry I didn´t kow how to publish
Thanks
nickrout
(Nick Rout)
May 29, 2021, 11:15pm
4
So when you say AC fails, are you talking about home assistant restarting, the esphome device restarting, or both.
when the esphome device restarts, on te home assistant I have an UPS
nickrout
(Nick Rout)
May 29, 2021, 11:46pm
6
I think use a variable in home assistant to keep the current setting, and set the esphome via an on_boot setting.
I have no idea how to do it. Can you help me?