Good afternoon. I have a working stepper motor in eshome with following configuration:
# Enable Home Assistant API
api:
services:
- service: control_stepper
variables:
target: int
then:
- stepper.set_target:
id: my_stepper
target: !lambda 'return target;'
- sensor.template.publish:
id: position
state: !lambda 'return target;'
cover:
- platform: template
name: "Motor"
id: my_blind
device_class: blind
open_action:
- stepper.set_target:
id: my_stepper
target: 10000
- sensor.template.publish:
id: position
state: !lambda return id(my_stepper).target_position;
close_action:
- stepper.set_target:
id: my_stepper
target: 0
- sensor.template.publish:
id: position
state: !lambda return id(my_stepper).target_position;
stop_action:
- stepper.set_target:
id: my_stepper
target: !lambda return id(my_stepper).current_position;
- sensor.template.publish:
id: position
state: !lambda return id(my_stepper).current_position;
optimistic: True
assumed_state: True
sensor:
- platform: template
name: "stepper Position"
id: position
stepper:
- platform: a4988
id: my_stepper
step_pin: GPIO18
dir_pin: GPIO19
max_speed: 500 steps/s
# Optional:
sleep_pin: GPIO2
acceleration: inf
deceleration: inf
This way I have a cover entity called “Motor” and another entity with the position called “stepper position”
I would like the progress bar to appear as with my blinds.
in addition, I would like to know if there is any way to change the speed without having to go .yaml in esphome by changing the value of “max_speed:”
Can anyone help me?
Thanks