The code is loosely based on https://github.com/leinich/ha-wordclock-esphome
61 lines
1.1 KiB
YAML
61 lines
1.1 KiB
YAML
esphome:
|
|
name: "${devicename}"
|
|
platformio_options:
|
|
build_flags:
|
|
- -DWORDCLOCK_DATA_PIN=22
|
|
- -DWORDCLOCK_NUM_LEDS=198
|
|
includes:
|
|
- wordclock.h
|
|
|
|
esp32:
|
|
board: wemos_d1_mini32
|
|
framework:
|
|
type: arduino
|
|
|
|
substitutions:
|
|
devicename: wordclock
|
|
friendly_name: "Wordclock"
|
|
light_friendly_name: "Wordclock Light"
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
ap:
|
|
ssid: "${devicename}"
|
|
password: !secret ap_password
|
|
manual_ip:
|
|
static_ip: !secret manualip_static_ip
|
|
gateway: !secret manualip_gateway
|
|
subnet: !secret manualip_subnet
|
|
|
|
api:
|
|
|
|
ota:
|
|
password: "${devicename}"
|
|
|
|
logger:
|
|
# esp8266_store_log_strings_in_flash: false
|
|
web_server:
|
|
port: 80
|
|
|
|
light:
|
|
- platform: fastled_clockless
|
|
id: fastledlight
|
|
chipset: WS2812
|
|
pin: 23
|
|
num_leds: 198
|
|
rgb_order: GRB
|
|
name: ${light_friendly_name}
|
|
restore_mode: ALWAYS_ON
|
|
|
|
time:
|
|
- platform: sntp
|
|
id: current_time
|
|
timezone: !secret timezone
|
|
|
|
custom_component:
|
|
- lambda: |-
|
|
auto wordclock = new Wordclock();
|
|
return {wordclock};
|
|
components:
|
|
- id: wordclock
|