Skip to content

Instantly share code, notes, and snippets.

@jasonblewis
Created June 10, 2021 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonblewis/8a2ef2b125ac7ee7ed532119d8e5b624 to your computer and use it in GitHub Desktop.
Save jasonblewis/8a2ef2b125ac7ee7ed532119d8e5b624 to your computer and use it in GitHub Desktop.
esphome:
name: m5stickc
platform: ESP32
board: m5stick-c
includes:
# - custom_components/axp192/axp192.h
#- custom_components/st7735/st7735.h
platformio_options:
# upload_speed: 230400
# upload_speed: 115200
upload_speed: 1500000
wifi:
networks:
- ssid: !secret home_ssid
password: !secret home_psk
priority: 80
- ssid: !secret homen_ssid
password: !secret homen_psk
priority: 90
- ssid: !secret homenac_ssid
password: !secret homenac_psk
priority: 100
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "M5Stickc Fallback Hotspot"
password: !secret fallback_pw
#captive_portal:
# Enable logging
logger:
# level: DEBUG
# level: DEBUG
# Enable Home Assistant API
api:
password: !secret ha_api_pw
ota:
password: !secret ota_pw
binary_sensor:
- platform: gpio
pin:
number: GPIO37
inverted: true
name: ${upper_devicename} Button A
on_release:
then:
- light.toggle: led1
# internal LED
light:
- platform: monochromatic
output: builtin_led
name: ${upper_devicename} Led
id: led1
output:
- platform: ledc
pin: 10
inverted: true
id: builtin_led
esp32_ble_beacon:
type: iBeacon
uuid: '75febca7-0081-4201-b1f1-4a84d05d9f43'
i2c:
- id: bus_a
sda: 21
scl: 22
scan: True
frequency: 400khz
- id: bus_b
setup_priority: 100
sda: 32
scl: 33
frequency: 100khz
scan: True
sensor:
- platform: axp192
setup_priority: 1000
address: 0x34
i2c_id: bus_a
update_interval: 30s
battery_level:
name: "M5Stick Battery Level"
id: "m5stick_batterylevel"
- platform: bmp280
setup_priority: -200
i2c_id: bus_b
address: 0x76
update_interval: 10s
temperature:
name: "BMP280 Temperature"
oversampling: 16x
pressure:
name: "Pressure"
- platform: sht3xd
setup_priority: -200
i2c_id: bus_b
address: 0x44
update_interval: 10s
temperature:
name: "SHT3xD Temperature"
humidity:
name: "Living Room Humidity"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment