-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-stepper.yaml
64 lines (54 loc) · 1.34 KB
/
my-stepper.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
esphome:
name: my-stepper
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: control_stepper
variables:
target: int
speed: float
# acceleration: float
# deceleration: float
then:
- stepper.set_speed:
id: my_stepper
speed: !lambda 'return speed;'
# - stepper.set_acceleration:
# id: my_stepper
# acceleration: !lambda 'return acceleration;'
# - stepper.set_deceleration:
# id: my_stepper
# deceleration: !lambda 'return deceleration;'
- stepper.report_position:
id: my_stepper
position: 0
- stepper.set_target:
id: my_stepper
target: !lambda 'return target;'
ota:
password: !secret ota_password
web_server:
port: 80
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "My-Stepper Fallback Hotspot"
password: "enJFRBlGCuyC"
captive_portal:
stepper:
- platform: a4988
id: my_stepper
step_pin: D3 #orange
dir_pin:
number: D4 #yellow
inverted: false
max_speed: 4000 steps/s
sleep_pin: D2 #brown enable
acceleration: inf
deceleration: inf