sphome:
    name: box
    comment: lightcontroller
esp32:
  board: esp32-s2-saola-1
  framework:
    type: arduino
    #type: esp-idf
    #version: recommended
    #sdkconfig_options:
    #  CONFIG_COMPILER_OPTIMIZATION_SIZE: y

logger:
  level: VERY_VERBOSE

api:
  encryption:
    key: !secret ESPHOME_API_KEY

ota:
  safe_mode: true
  password: !secret HA_OTA_PASSWORD

wifi:
  power_save_mode: none # none (default for esp8266), light (default for esp32), high
  ssid: !secret WLAN_ASUS_SSID
  password: !secret WLAN_ASUS_PASSWORD
  manual_ip:
    static_ip: !secret ESP32_S2_BIGBOX_LIGHT_IP
    gateway: !secret WLAN_ASUS_GATEWAY_IP
    subnet: !secret WLAN_ASUS_SUBNET
    dns1: !secret WLAN_ASUS_DNS1

  ap:
    ssid: "Bigbox-Lightcontrol"
    password: !secret WIFI_AP_PASSWORD
 
web_server:
  port: 80
  auth:
    username: admin
    password: admin

light:

  - platform: monochromatic
    name: " Panel 1 GPIO14"
    output: pwm_panel_1_GPIO14
  - platform: monochromatic
    name: " Panel 1 GPIO17"
    output: pwm_panel_1_GPIO17
  - platform: monochromatic
    name: " Panel 1 GPIO33"
    output: pwm_panel_1_GPIO33
  - platform: monochromatic
    name: " Panel 2 GPIO15"
    output: pwm_panel_2_GPIO15
  - platform: monochromatic
    name: "testportGPIO16"
    output: test_GPIO16

output:
  - platform: ledc
    pin: GPIO33
    frequency: 4000 Hz
    id: pwm_panel_1_GPIO33
  - platform: ledc
    pin: GPIO14
    frequency: 4000 Hz
    id: pwm_panel_1_GPIO14
  - platform: ledc
    pin: 
      number: GPIO17
      mode:
        input: true
        output: true
        pullup: true
    frequency: 4000 Hz
    id: pwm_panel_1_GPIO17
  - platform: ledc
    pin: GPIO15
    frequency: 1000 Hz
    id: pwm_panel_2_GPIO15
  - platform: ledc
    pin: GPIO16
    frequency: 1000 Hz
    id: test_GPIO16
    

# Sensoren am I2C Bus
i2c:
  sda: GPIO8
  scl: GPIO9
  scan: true
  id: bus_a
sensor:
  # Pimoroni BME60 Sensor
  - platform: bme680
    temperature:
      name: "BME680 Temperatur"
      oversampling: 16x
      filters:
        offset: -0.65
    pressure:
      name: " BME680 Pressure"
    humidity:
      name: " BME680 Humidity"
      filters:
        offset: -0.065
    gas_resistance:
      name: " BME680 Gas Resistance"
    i2c_id: bus_a
    address: 0x76
    update_interval: 60s
  # BH1750 Lux/Lumen sensor
  - platform: bh1750
    name: " BH1750 Nr1Illuminance"
    i2c_id: bus_a
    address: 0x5C
    update_interval: 60s
  - platform: bh1750
    name: " BH1750 Nr2 Illuminance"
    i2c_id: bus_a
    address: 0x23
    update_interval: 60s