最近买了个M5Stack ATOM Matrix,整体做工还行,有些小瑕疵,不影响。很迷你,挺喜欢,就是太贵了。
以下为接入代码,完全接入,并可在homeassistant中显示。红外需要自己添加设备,不过据说信号不行。
esphome:
name: gradienter
friendly_name: gradienter
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: ""
ota:
password: "homeassistant"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Gradienter"
password: "homeassistant"
captive_portal:
i2c:
sda: 25
scl: 21
scan: true
id: bus_a
sensor:
- platform: mpu6886
i2c_id: bus_a
id: gradienter_info
address: 0x68
update_interval: 1s
accel_x:
name: "MPU6886 Accel X"
accel_y:
name: "MPU6886 Accel Y"
accel_z:
name: "MPU6886 Accel z"
gyro_x:
name: "MPU6886 Gyro X"
gyro_y:
name: "MPU6886 Gyro Y"
gyro_z:
name: "MPU6886 Gyro z"
temperature:
name: "MPU6886 Temperature"
binary_sensor:
- platform: gpio
pin: 39
name: user_button
light:
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: 27
num_leds: 25
rmt_channel: 1
chipset: ws2812
name: "My Light"
effects:
# Customize parameters
- random:
name: "My Slow Random Effect"
transition_length: 30s
update_interval: 30s
- random:
name: "My Fast Random Effect"
transition_length: 4s
update_interval: 5s
- pulse:
name: "Fast Pulse"
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0%
max_brightness: 100%
- pulse:
name: "Slow Pulse"
# transition_length: 1s # defaults to 1s
update_interval: 2s
- random:
name: Random Effect With Custom Values
transition_length: 5s
update_interval: 7s
- strobe:
name: Strobe Effect With Custom Values
colors:
- state: true
brightness: 100%
red: 100%
green: 90%
blue: 0%
duration: 500ms
- state: false
duration: 250ms
- state: true
brightness: 100%
red: 0%
green: 100%
blue: 0%
duration: 500ms
- flicker:
name: Flicker Effect With Custom Values
alpha: 95%
intensity: 1.5%
- addressable_rainbow:
name: Rainbow Effect With Custom Values
speed: 10
width: 50
- addressable_color_wipe:
# name: Color Wipe Effect With Custom Values
# colors:
# - red: 100%
# green: 100%
# blue: 100%
# num_leds: 1
# - red: 0%
# green: 0%
# blue: 0%
# num_leds: 1
# add_led_interval: 100ms
# reverse: false
- addressable_scan:
name: Scan Effect With Custom Values
move_interval: 100ms
scan_width: 1
- addressable_twinkle:
name: Twinkle Effect With Custom Values
twinkle_probability: 5%
progress_interval: 4ms
- addressable_random_twinkle:
name: Random Twinkle Effect With Custom Values
twinkle_probability: 5%
progress_interval: 32ms
- addressable_fireworks:
name: Fireworks Effect With Custom Values
update_interval: 32ms
spark_probability: 10%
use_random_color: false
fade_out_rate: 120
remote_transmitter:
pin: GPIO12
carrier_duty_percent: 50%
|