substitutions:
  devicename: og-sz-le-bett-l
  wledname: WLED-SZ-Bett-L

esphome:
  name: ${devicename}
  platform: ESP8266
  board: nodemcuv2

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "qSnmhRiXNnS0LY9mTpvpcX980ZkFalMaxVIR8Vf1yaM="

ota:
  password: "6f81ed36e808ec92426a873fc317568d"

captive_portal:

wifi:
  ssid: !secret wifi_wled_ssid
  password: !secret wifi_wled_password

  manual_ip:
    static_ip: 192.168.1.49
    gateway: 192.168.1.1
    subnet: 255.255.255.0
    
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${devicename}"
    password: "6GDUC8n39JCP"

wled:

e131:
  method: multicast # default: register E1.31 to Multicast group
    
# Example configuration entry
light:
  - platform: neopixelbus
    id: neopixel
    name: "NeoPixel Light"
    type: GRB
    variant: WS2812
    pin: RX
    num_leds: 12
    internal: true
    
  - platform: partition
    name: "${devicename} WLED"
    segments:
      # Use first 10 LEDs from the light with ID light1
      - id: neopixel
        from: 0
        to: 11
    effects:
      - wled:
          port: 19446
      - e131:
          universe: 1
          channels: RGB

switch:
  - platform: restart
    name: "${devicename} Neustart"

sensor:
  - platform: wifi_signal
    name: "${devicename} Wi-Fi Signal"
    update_interval: 60s

  - platform: uptime
    name: "${devicename} Uptime"
    update_interval: 60s

# Example configuration entry
text_sensor:
  - platform: wifi_info
    ip_address:
      name: "${devicename} Wi-Fi IP Address"
    ssid:
      name: "${devicename} Wi-Fi Connected SSID"
    bssid:
      name: "${devicename} Wi-Fi Connected BSSID"
    mac_address:
      name: "${devicename} Wi-Fi Mac Address"
    scan_results:
      name: "${devicename} Wi-Fi Latest Scan Results"
  - platform: version
    name: "${devicename} Version"