Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
esphome:
name: office_blinds
platform: ESP8266
board: d1_mini
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "OfficeBlinds"
password: !secret fallback_ap_password
web_server:
port: 80
stepper:
- platform: a4988
id: my_stepper
sleep_pin: D3
step_pin: D2
dir_pin: D1
max_speed: 800 steps/s
cover:
- platform: template
device_class: blind
name: "Office Blinds"
open_action:
- stepper.set_target:
id: my_stepper
target: 0
close_action:
- stepper.set_target:
id: my_stepper
target: 15000
stop_action:
- stepper.set_target:
id: my_stepper
target: !lambda return id(my_stepper).current_position;
optimistic: true
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: set_closed_position
then:
- stepper.report_position:
id: my_stepper
position: 15000
- stepper.set_target:
id: my_stepper
target: 15000
- service: set_open_position
then:
- stepper.report_position:
id: my_stepper
position: 0
- stepper.set_target:
id: my_stepper
target: 0
- service: control_stepper
variables:
target: int
then:
- stepper.set_target:
id: my_stepper
target: !lambda 'return target;'
ota: