81 lines
1.4 KiB
YAML
81 lines
1.4 KiB
YAML
esphome:
|
|
name: ${device_id}
|
|
name_add_mac_suffix: true
|
|
friendly_name: "${device_name}"
|
|
project:
|
|
name: "${project_name}"
|
|
version: "${project_version}"
|
|
|
|
esp32:
|
|
board: esp32-s3-devkitc-1
|
|
framework:
|
|
type: esp-idf
|
|
|
|
api:
|
|
encryption:
|
|
key: !secret api_key
|
|
|
|
i2c:
|
|
- id: i2c0
|
|
sda: 38
|
|
scl: 39
|
|
frequency: 400kHz
|
|
|
|
spi:
|
|
clk_pin: 17
|
|
mosi_pin: 21
|
|
|
|
output:
|
|
- platform: ledc
|
|
id: lcd_backlight_drive
|
|
pin: 16
|
|
frequency: 500Hz
|
|
min_power: 0.2
|
|
max_power: 1
|
|
zero_means_zero: true
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
id: top_button
|
|
icon: mdi:button-pointer
|
|
pin:
|
|
number: 41
|
|
inverted: true
|
|
name: "Button"
|
|
on_press:
|
|
- light.turn_on: lcd_backlight
|
|
- script.execute: backlight_off
|
|
|
|
light:
|
|
- platform: esp32_rmt_led_strip
|
|
id: led
|
|
icon: mdi:led-off
|
|
rgb_order: GRB
|
|
pin: 35
|
|
num_leds: 4
|
|
chipset: ws2812
|
|
name: "LED"
|
|
restore_mode: ALWAYS_ON
|
|
default_transition_length: 0.5s
|
|
- platform: monochromatic
|
|
id: lcd_backlight
|
|
output: lcd_backlight_drive
|
|
name: "LCD backlight"
|
|
|
|
sensor:
|
|
- platform: mpu6886
|
|
i2c_id: i2c0
|
|
accel_x:
|
|
name: "Accel X"
|
|
accel_y:
|
|
name: "Accel Y"
|
|
accel_z:
|
|
name: "Accel Z"
|
|
gyro_x:
|
|
name: "Gyro X"
|
|
gyro_y:
|
|
name: "Gyro Y"
|
|
gyro_z:
|
|
name: "Gyro Z"
|
|
temperature:
|
|
name: "IMU Temperature"
|