Skip to content

Instantly share code, notes, and snippets.

@bogorad
Last active June 1, 2025 12:00
Show Gist options
  • Save bogorad/dcaff9205bd959614efa6cc9a5b54fab to your computer and use it in GitHub Desktop.
Save bogorad/dcaff9205bd959614efa6cc9a5b54fab to your computer and use it in GitHub Desktop.
current esphome config for m5stack-nano-c6
# radar_entrance.yaml
substitutions:
LOCATION: "entrance"
name: "radar_${LOCATION}"
friendly_name: "radar_${LOCATION}"
<<: !include packages/generic_m5stack-nano-c6.yaml
# !!! When overriding, copy button & light from config!!!
#######################################################
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
#######################################################
### separate files follow ###
# packages/generic_m5stack-nano-c6.yaml
#substitutions:
# LOCATION: "test"
# name: "radar_${LOCATION}"
# friendly_name: "radar_${LOCATION}"
#
#<<: !include radar_generic_m5stack.yaml.txt
## !!! When overriding, copy button & light from config!!!
########################################################
#wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
#######################################################
#######################################################
esphome:
name: ${name}
friendly_name: "${friendly_name}"
name_add_mac_suffix: false
comment: "M5stack c6 generic test"
platformio_options:
platform: https://github.com/platformio/platform-espressif32/archive/refs/tags/v6.7.0.zip
board_build.f_cpu: 160000000L
board_build.f_flash: 80000000L
board_build.flash_size: 4MB
build_flags: "-DBOARD_HAS_PSRAM"
board_build.arduino.memory_type: qio_opi
esp32:
board: esp32-c6-devkitm-1
variant: esp32c6
framework:
type: esp-idf
version: 5.2.1
# version: "5.3.0"
platform_version: 6.8.1
sdkconfig_options:
CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y
ota:
platform: esphome
password: !secret ota_password
api:
logger:
level: DEBUG
bluetooth_proxy:
active: true
esp32_improv:
authorizer: m5stack_button
# esp32_ble_tracker:
# scan_parameters:
# active: false
remote_transmitter:
pin: GPIO3
# Infrared remotes use a 50% carrier signal
carrier_duty_percent: 50%
# rmt_channel: 1
#######################################################
packages:
light: !include light-nano-c6.yaml
switch: !include switch-nano-c6.yaml
sensor: !include sensor.yaml
button: !include button.yaml
text_sensor: !include text_sensor.yaml
binary_sensor: !include binary_sensor-nano-c6.yaml
#######################################################
# packages/light-nano-c6.yaml
# Configuration of M5 Atom Lite onboard RGB LED
light:
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO20
num_leds: 1
# rmt_channel: 0
chipset: WS2812
is_rgbw: true
id: m5stack_led
name: "Light"
icon: "mdi:led-outline"
effects:
- random:
- flicker:
- addressable_rainbow:
# packages/switch-nano-c6.yaml
switch:
- platform: factory_reset
name: "Restart with Factory Default Settings"
entity_category: "diagnostic"
- platform: restart
name: "Restart"
- platform: gpio
pin: GPIO7
name: "on board LED"
- platform: gpio
pin: GPIO19
name: "RGB on/off"
# packages/sensor.yaml
sensor:
- platform: wifi_signal
name: "WiFi Signal"
update_interval: 60s
- platform: uptime
name: Uptime
update_interval: 60s
# packages/button.yaml
button:
- platform: safe_mode
name: "Safe Mode Boot"
entity_category: diagnostic
id: ${name}_safe_mode_boot
# packages/text_sensor.yaml
text_sensor:
- platform: wifi_info
ip_address:
name: "My IP Address"
id: ${name}_my_ip_address
icon: "mdi:ip"
mac_address:
name: "My Mac Wifi Address"
id: ${name}_my_mac_wifi_address
icon: "mdi:ip-network"
ssid:
name: "Connected SSID"
id: ${name}_connected_ssid
icon: "mdi:wifi"
bssid:
name: "Connected BSSID"
id: ${name}_connected_bssid
icon: "mdi:wifi"
dns_address:
name: "DNS Address"
id: ${name}_dns_address
icon: "mdi:dns"
# packages/binary_sensor-nano-c6.yaml
# Configuration of M5 Atom Lite onboard onboard button
binary_sensor:
- platform: gpio
name: "Button"
id: m5stack_button
pin:
number: GPIO9
inverted: true
- platform: xiaomi_wx08zm
mac_address: "xx:xx:xx:c2:3f:a9"
name: "Mosquito Power xx"
id: ${name}_mosquitto_power_xx
icon: mdi:bug
- platform: xiaomi_wx08zm
mac_address: "xx:xx:xx:c1:4e:de"
name: "Mosquito Power yy"
id: ${name}_mosquitto_power_yy
icon: mdi:bug
# - platform: xiaomi_wx08zm
# mac_address: "xx:xx:xx:c3:91:79"
# name: "Mosquito Power xx"
# id: ${name}_mosquitto_power_zz
# icon: mdi:bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment