83 lines
1.7 KiB
YAML
83 lines
1.7 KiB
YAML
esphome:
|
|
name: ${NAME}
|
|
friendly_name: ${FRIENDLY_NAME}
|
|
|
|
# Enable logging
|
|
logger:
|
|
level: ${LOGGER}
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
custom_services: true
|
|
homeassistant_services: true
|
|
batch_delay: 120ms # Reduce latency for real-time applications
|
|
max_send_queue: 32 # Maximum queued messages per connection before disconnect
|
|
|
|
ota:
|
|
- platform: esphome
|
|
|
|
wifi:
|
|
id: wifi_id
|
|
# ssid: ow
|
|
# password: mata1234
|
|
ssid: !secret wifiname
|
|
password: !secret wifipass
|
|
|
|
manual_ip:
|
|
static_ip: ${IP}
|
|
gateway: 192.168.11.1
|
|
subnet: 255.255.255.0
|
|
dns1: 192.168.11.111
|
|
power_save_mode: NONE
|
|
on_connect:
|
|
then:
|
|
- light.turn_on:
|
|
id: led
|
|
brightness: 25%
|
|
red: 0%
|
|
green: 100%
|
|
blue: 0%
|
|
|
|
on_disconnect:
|
|
then:
|
|
- light.turn_on:
|
|
id: led
|
|
brightness: 25%
|
|
red: 100%
|
|
green: 0%
|
|
blue: 0%
|
|
|
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
|
ap:
|
|
ssid: ${FRIENDLY_NAME}
|
|
password: "12345678"
|
|
light:
|
|
- platform: esp32_rmt_led_strip
|
|
id: led
|
|
name: None
|
|
internal: true
|
|
disabled_by_default: true
|
|
entity_category: config
|
|
pin: ${LED}
|
|
default_transition_length: 0s
|
|
chipset: SK6812
|
|
num_leds: 1
|
|
rgb_order: grb
|
|
effects:
|
|
- pulse:
|
|
name: "slowpulse"
|
|
transition_length: 250ms
|
|
update_interval: 250ms
|
|
min_brightness: 50%
|
|
max_brightness: 100%
|
|
- pulse:
|
|
name: "fastpulse"
|
|
transition_length: 100ms
|
|
update_interval: 100ms
|
|
min_brightness: 50%
|
|
max_brightness: 100%
|
|
captive_portal:
|
|
switch:
|
|
- platform: restart
|
|
name: Restart
|
|
id: rbt |