Files
esphome-axp2101/sample-config/m5core2.yaml
2023-12-21 20:50:53 -08:00

75 lines
1.3 KiB
YAML

esphome:
name: m5stack-core2
platform: ESP32
board: m5stack-core-esp32
# Use this to hardlink the component if it is not discovered
# includes:
# - /config/custom_components/axp192/axp192.h
wifi:
ssid: "SSID"
password: "PASSPHRASE"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "XXX"
password: "XXX"
substitutions:
devicename: ${devicename}
upper_devicename: ${upper_devicename}
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
web_server:
# axp2101 power management - must be present to initialize TFT power on
sensor:
- platform: axp2101
model: M5CORE2
address: 0x34
i2c_id: bus_a
update_interval: 30s
brightness: 75%
battery_level:
name: "Battery Level"
- platform: wifi_signal
name: WiFi Signal
- platform: uptime
name: Uptime Sensor
spi:
clk_pin: GPIO18
mosi_pin: GPIO23
miso_pin: GPIO38
i2c:
- id: bus_a
sda: GPIO21
scl: GPIO22
scan: True
font:
- file: 'fonts/arial.ttf'
id: font1
size: 8
display:
- platform: ili9xxx
model: ILI9342
cs_pin: GPIO5
dc_pin: GPIO15
lambda: |-
it.print(80, 0, id(my_font), id(my_red), TextAlign::TOP_CENTER, "Hello World!");