Files
haos/esphome/archive/esp32-c3-super-mini.yaml
T
2026-06-03 06:23:28 +09:00

96 lines
2.1 KiB
YAML

esphome:
name: esp32-c3-super-mini
friendly_name: esp32-c3-super-mini
esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "7/4BEBLQUAfCGxlodKoCdmqyXdoccriTOrSTiym/mRc="
ota:
- platform: esphome
password: "58a6f3533ea6a2e8b47a27b5db685b92"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-C3-Super-Mini"
password: "8vh1bCexlpWA"
captive_portal:
time:
- platform: homeassistant
id: ha_time
spi:
clk_pin: 4 # 4 SCL 핀
mosi_pin: 6 # 6 SDA 핀 (변경)
display:
- platform: st7789v
model: Custom
width: 240
height: 320
offset_height: 0
offset_width: 0
dc_pin: 2
reset_pin: 1
cs_pin: 7
# 7핀 모델에 CS 핀이 없다면 아래 줄은 삭제하세요.
# 만약 CS 핀이 있다면 연결한 번호(예: 7)를 적으세요.
eightbitcolor: true
rotation: 90
update_interval: 60s
lambda: |-
// 이미지 출력 (좌표 10, 10에 출력)
//it.image(0, 0, id(my_logo));
// 텍스트와 함께 출력
//it.print(50, 250, id(my_font),Color(255, 255, 0), "박향기");
it.fill(Color(0, 0, 0)); // 배경 검은색
// 현재 시간 가져오기
auto time = id(ha_time).now();
// 1. 큰 시계 (시:분)
// %H: 24시간 형식, %M: 분
it.printf(150, 170, id(time_font), Color(0, 255, 0), TextAlign::CENTER,
"%02d:%02d", time.hour % 12, time.minute);
// 3. 날짜 표시 (상단)
it.printf(150, 70, id(my_font), Color(255, 255, 255), TextAlign::CENTER,
"%02d-%02d", time.month, time.day_of_month);
# 폰트 정의 (선택 사항)
font:
- file: "IBMPlexSansKR-Text.ttf"
id: my_font
size: 65
glyphs: "0123456789:-"
- file: "IBMPlexSansKR-Text.ttf"
id: time_font
size: 80
glyphs: "0123456789:-"
# image:
# - file: "zen.png"
# id: my_logo
# #resize: 50x50 # 원하는 크기로 조절
# type: RGB # 컬러 디스플레이이므로 COLOR 설정esphome