esphome:
  name: fogmachine2
  friendly_name: FogMachine2

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "HgH/4MUosNnD8kSJAYZ6R0bm4ZChsPqS4Adn/DwrigQ="

ota:
  password: "a626cbe874b458778100ba75e0be4b68"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Fogmachine2 Fallback Hotspot"
    password: "N3cHg2GqLtkW"

captive_portal:
    
switch:
  - platform: gpio
    inverted: yes
    name: "Pump"
    pin: 5
    id: pump_gpio

  - platform: gpio
    inverted: yes
    name: "Heater"
    pin: 21
    id: heater_gpio

binary_sensor:
  - platform: gpio
    id: heater_status
    pin:
      number: 6
      mode:
        input: true
        pullup: true
    name: "Heater Ready"
    filters: 
      - lambda: |-
          if (id(heater_gpio).state) {
            return x;
          } else {
            return false;
          }    