shutter
This commit is contained in:
77
shutter.yaml
Normal file
77
shutter.yaml
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
esphome:
|
||||||
|
name: esp-shutter
|
||||||
|
friendly_name: ESP-SHUTTER
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32dev
|
||||||
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
level: verbose
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: !secret api_key
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: !secret ota_password
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret wifi_ssid
|
||||||
|
password: !secret wifi_password
|
||||||
|
manual_ip:
|
||||||
|
static_ip: 192.168.1.56
|
||||||
|
gateway: 192.168.0.1
|
||||||
|
subnet: 255.255.255.0
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "Esp32S3N16R8 Fallback Hotspot"
|
||||||
|
password: "v41VUZA7A1VA"
|
||||||
|
|
||||||
|
|
||||||
|
output:
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO18
|
||||||
|
id: transistor_1
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO17
|
||||||
|
id: transistor_2
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO5
|
||||||
|
id: transistor_3
|
||||||
|
|
||||||
|
script:
|
||||||
|
- id: pulse_transistor_1
|
||||||
|
then:
|
||||||
|
- output.turn_on: transistor_1
|
||||||
|
- delay: 500ms
|
||||||
|
- output.turn_off: transistor_1
|
||||||
|
- id: pulse_transistor_2
|
||||||
|
then:
|
||||||
|
- output.turn_on: transistor_2
|
||||||
|
- delay: 500ms
|
||||||
|
- output.turn_off: transistor_2
|
||||||
|
- id: pulse_transistor_3
|
||||||
|
then:
|
||||||
|
- output.turn_on: transistor_3
|
||||||
|
- delay: 500ms
|
||||||
|
- output.turn_off: transistor_3
|
||||||
|
|
||||||
|
button:
|
||||||
|
- platform: template
|
||||||
|
name: "Shutter Up"
|
||||||
|
on_press:
|
||||||
|
- script.execute: pulse_transistor_1
|
||||||
|
- platform: template
|
||||||
|
name: "Shutter Down"
|
||||||
|
on_press:
|
||||||
|
- script.execute: pulse_transistor_2
|
||||||
|
- platform: template
|
||||||
|
name: "Shutter Stop"
|
||||||
|
on_press:
|
||||||
|
- script.execute: pulse_transistor_3
|
Reference in New Issue
Block a user