notabitail
Big Rooster
- Apr 2, 2023
- 13,032
- 92,564
- 1,266
I plugged into chatgpt (as much as I hate AI, I ended up doing this out of desperation), and it said the indentation was wrong and says it fixed it. It's compiling right now.I got the parts, but I can't seem to get the ESPHome code onto it.
This is the code:
But all it does is give me this error:esphome:
name: esphome-web-a8b0d8
friendly_name: Chicken Coop Door
min_version: 2024.11.0
name_add_mac_suffix: false
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
wifi:
ssid: WiFIName
password: Wifipassword
captive_portal:
output:
- platform: ledc
id: motor_1_a
pin: GPIO2 # Pin to IN1
- platform: ledc
id: motor_1_b
pin: GPIO4 # Pin to IN2
- platform: ledc
pin: GPIO5 # Pin to EAN
id: motor_enable
frequency: 1000Hz
fan:
- platform: hbridge
id: Door_Motor
name: "Door Motor"
pin_a: motor_1_a
pin_b: motor_1_b
decay_mode: SLOW
enable_pin: motor_enable
speed_count: 100
button:
- platform: template
name: "Door Up"
on_press:
then:
- fan.turn_on:
id: Door_Motor
direction: Forward
- delay: 5s
- fan.turn_off: Door_Motor
- platform: template
name: "Door Down"
on_press:
then:
- fan.turn_on:
id: Door_Motor
direction: REVERSE
- delay: 5s
- fan.turn_off: Door_Motor
View attachment 4031285
Am I doing something wrong here?
BYC doesn't appear to like the indentation.