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 mqtt: broker: mqtt.hadow.fr port: 18832 username: fire password: !secret mqtt_password topic_prefix: "esp_shutter" ota: - platform: esphome password: !secret ota_password wifi: networks: - 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 dns1: 9.9.9.9 dns2: 149.112.112.112 - ssid: !secret wifi_ssid2 password: !secret wifi_password2 manual_ip: static_ip: 192.168.4.56 gateway: 192.168.4.1 subnet: 255.255.255.0 dns1: 9.9.9.9 dns2: 149.112.112.112 use_address: 192.168.1.56 # 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