Hi, I have a ESP12F that I want to use to drive a stepper motor to open and close a blind. The physical buttons on GPIO14 (to open the blind) and GPIO13 (to close the blind) works. But now I want to put a “software” button on the Home Assitant Overview to do the same.
I created a button called:
input_button.blinds_open
Below is my configuration code for the ESP8266. But when I press the “input_button.blinds_open” nothing happens. Any ideas?
binary_sensor:
#Open Blind Physical Button
- platform: gpio
pin:
number: GPIO14
mode: INPUT_PULLUP
inverted: True
name: "Open Blind Button"
id: open_blind_button
on_press:
- cover.open: roll_blind
#Close Blind Physical Button
- platform: gpio
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: True
name: "Close Blind Button"
id: close_blind_button
on_press:
- cover.close: roll_blind
#Software Button on HA Overview
text_sensor:
- platform: homeassistant
name: "Open the Blinds"
entity_id: input_button.blinds_open
on_value:
then:
- cover.open: roll_blind
cover:
- platform: template
name: "Roll Blind Automation"
id: roll_blind
open_action:
- stepper.set_target:
id: my_stepper
target: 1000
close_action:
- stepper.set_target:
id: my_stepper
target: 0
optimistic: true
#Stepper Motor Configuration
stepper:
- platform: uln2003
id: my_stepper
pin_a: GPIO1
pin_b: GPIO3
pin_c: GPIO5
pin_d: GPIO4
max_speed: 400 steps/s
sleep_when_done: true
# Optional:
acceleration: inf
deceleration: inf