Quantcast
Channel: ESPHome - Home Assistant Community
Viewing all articles
Browse latest Browse all 1486

ESPHome and using YAML to program autmation on the ESP-32

$
0
0

@jayg37 wrote:

Hello all,
I’m trying to use an ESP-32 to remotely control my pool pump via a series of relays. I’ve managed to use ESPHome to upload yaml files into the ESP32 so that i can view 4 switches in my home assistant GUI. Now i want to create schedules to control the pump throughout the day but want to off load that work to the ESP32 rather than use HA.
I can muddle my way through VB and C (Arduino IDE) but i just can’t figure out how to do this in YAML.

I would like to set relays in a certain on/off position and then based on a time passed or clock to change the relay positions to their next position sequence.

Can someone point me in the right direction?
I’m looking to cycle through my pump timers via relay inputs based on time of day. Also being able to activate a certain relay sequence as needed via HA automation. (turn on water jets then kick pump to full power and vice versa)
Untitled

My current code:

esphome:
  name: pool
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "xxxxxxx"
  password: "xxxxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "xxxxxx"
    password: "xxxxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "xxxxx"

ota:
  password: "xxxxxx"
  
switch:
  - platform: gpio
    name: "Relay 1"
    pin: GPIO4
  - platform: gpio
    name: "Relay 2"
    pin: GPIO5
  - platform: gpio
    name: "Relay 3"
    pin: GPIO12
  - platform: gpio
    name: "Relay 4"
    pin: GPIO14

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1486

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>