esphome:
  name: led3xdrv
  friendly_name: Led 3x

esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: esp-idf

logger:
  baud_rate: 0

api:
  encryption:
    key: "naGRefDq/h5OWxKuRx+Wo7lJbgz9ynFkUajsMPrBrY4="

ota:
  - platform: esphome
    password: "2fd6ea54e1209c9ce76a7d9392108b71"

wifi:
  ssid: "Lothlorien"
  password: "LitwoOjczyznoMojaTysJestJakZdrowie"

web_server:

output:
  - platform: ledc
    pin: GPIO4
    id: led_pwm01
    frequency: 10000 Hz
  - platform: ledc
    pin: GPIO5
    id: led_pwm02
    frequency: 10000 Hz
  - platform: ledc
    pin: GPIO6
    id: led_pwm03
    frequency: 10000 Hz

light:
  - platform: monochromatic
    name: "LED PWM 1"
    output: led_pwm01
    gamma_correct: 1.0
  - platform: monochromatic
    name: "LED PWM 2"
    output: led_pwm02
    gamma_correct: 1.0
  - platform: monochromatic
    name: "LED PWM 3"
    output: led_pwm03
    gamma_correct: 1.0

switch:
  - platform: gpio
    id: grove_relay
    name: "Power AC-DC"
    pin:
      number: GPIO1
      mode:
        output: true
        pullup: false
        pulldown: false
    inverted: false # jeśli nie kliknie – zmień na true i sprawdź
    restore_mode: ALWAYS_OFF

button:
  - platform: restart
    name: "Restart Device"
  - platform: safe_mode
    name: "Restart in Safe Mode"

sensor:
  - platform: wifi_signal
    name: "WiFi RSSI"
    id: wifi_rssi
    update_interval: 30s

  - platform: uptime
    name: "Uptime (s)"
    id: uptime_s
    update_interval: 60s

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO9 # BOOT na większości C3
      mode: INPUT_PULLUP
      inverted: true
    name: "BOOT Button"
    id: btn_boot

  - platform: gpio
    pin:
      number: GPIO7
      mode:
        input: true
        pullup: false
        pulldown: true
    name: "Czujnik ruchu SR505"
    device_class: motion
    filters:
      - delayed_off: 2s
