ESP32 Camera

More info:
https://github.com/Henning-Klatt/esphome-config/tree/main/esp32-cam-1
https://www.printables.com/de/model/538023-esp-32-camera

substitutions:
  friendly_name: ESP32 CAM 1
  device_name: esp32-cam-1

esphome:
  name: $device_name

esp32:
  board: nodemcu-32s

wifi:
  networks:
  - ssid: !secret wifi_ssid_1
    password: !secret wifi_password_1
  - ssid: !secret wifi_ssid_2
    password: !secret wifi_password_2


logger:
  level: INFO
  # baud_rate: 0

api:
  password: !secret api_password
  encryption:
    key: !secret esp32-cam-1-key
  reboot_timeout: 24h

ota:
  password: !secret ota_password

web_server:
  port: 80

time:
  - platform: homeassistant
    id: homeassistant_time

i2c:
  sda: GPIO2
  scl: GPIO13
  scan: false
  id: i2c_bus


sensor:
  - platform: bme280
    temperature:
      name: "$friendly_name Temperature"
      oversampling: 16x
    pressure:
      name: "$friendly_name Pressure"
    humidity:
      name: "$friendly_name Humidity"
    address: 0x76
    update_interval: 60s

output:
  - platform: ledc
    pin: GPIO4
    id: gpio_4

light:
  - platform: monochromatic
    output: gpio_4
    name: "$friendly_name Light"

status_led:
  pin:
    number: GPIO33
    inverted: true

esp32_camera:
  external_clock:
    pin: GPIO0
    frequency: 20MHz
  i2c_pins:
    sda: GPIO26
    scl: GPIO27
  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22
  power_down_pin: GPIO32

  # Image settings
  name: $friendly_name
  max_framerate: 1 fps
  resolution: 1280x1024 # SXGA
  jpeg_quality: 10 # best
  vertical_flip: false
  horizontal_mirror: false