esphome: name: neopixel-controller
esp8266: board: esp01_1m
# Enable logginglogger:
# Enable Home Assistant APIapi:
ota: password: !secret ota_pw_neopixel_controller
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Testcontroller Fallback AP" password: !secret wifi_password_fallback captive_portal:
binary_sensor: - platform: gpio pin: number: GPIO0 mode: INPUT_PULLUP inverted: True name: "Device Button" on_press: then: # - light.toggle: light_1 - switch.toggle: relay
light: - platform: neopixelbus id: light_1 type: GRB variant: WS2812 pin: GPIO3 num_leds: 10 name: "NeoPixel" effects: - addressable_rainbow: - addressable_rainbow: name: Rainbow Effect With Custom Values speed: 10 width: 100 - random: name: "Slow Random Effect" transition_length: 30s update_interval: 30s - random: name: "Fast Random Effect" transition_length: 4s update_interval: 5s - strobe: name: Water Leak Alarm colors: - state: True brightness: 100% red: 0% green: 0% blue: 100% duration: 200ms - state: False duration: 200ms - state: True brightness: 100% red: 0% green: 0% blue: 100% duration: 200ms - state: False duration: 400ms - addressable_random_twinkle: - addressable_random_twinkle: name: Random Twinkle Effect With Custom Values twinkle_probability: 5% progress_interval: 32ms
status_led: pin: number: GPIO13 inverted: yes id: led_status
switch: - platform: gpio name: "Relais" icon: "mdi:restart" pin: GPIO12 id: relay - platform: gpio name: "Relais 2" icon: "mdi:lightbulb-auto" id: relay2 pin: GPIO1 on_turn_on: - delay: 2 s - switch.turn_off: relay2