esphome/tests/components/stepper/test.esp32-idf.yaml
Keith Burzinski 06829b53fe
Add some components to the new testing framework (S part 2) (#6227)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-04-24 07:40:20 +12:00

27 lines
602 B
YAML

stepper:
- platform: a4988
id: test_stepper
step_pin: 3
dir_pin: 4
sleep_pin: 5
max_speed: 250 steps/s
acceleration: 100 steps/s^2
deceleration: 200 steps/s^2
switch:
- platform: template
name: Stepper Switch
assumed_state: true
turn_on_action:
- stepper.set_target:
id: test_stepper
target: !lambda |-
static int32_t i = 0;
i += 1000;
if (i > 5000) {
i = -5000;
}
return i;
- stepper.report_position:
id: test_stepper
position: 0