Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
version: '3'
# Common ESPHome operations for the fan controller firmware.
# Install Task first: `brew install go-task`. Then `task --list`.
vars:
CONFIG: firmware/fancontroller.yaml
DEVICE: '{{.DEVICE | default "fancontroller.local"}}'
tasks:
default:
desc: List available tasks
cmds:
- task --list
install:
desc: Install ESPHome CLI via Homebrew
status:
- command -v esphome
cmds:
- brew install esphome
config:
desc: Validate the ESPHome YAML
deps: [install]
cmds:
- esphome config {{.CONFIG}}
compile:
desc: Compile the firmware without uploading
deps: [install]
cmds:
- esphome compile {{.CONFIG}}
upload:
desc: Compile and OTA-flash the running device (DEVICE=fancontroller.local by default)
deps: [install]
cmds:
- esphome run {{.CONFIG}} --device {{.DEVICE}} --no-logs
flash-usb:
desc: First-time USB flash (set PORT=/dev/cu.wchusbserial...)
deps: [install]
requires:
vars: [PORT]
cmds:
- esphome run {{.CONFIG}} --device {{.PORT}} --no-logs
logs:
desc: Stream device logs over the network
deps: [install]
cmds:
- esphome logs {{.CONFIG}} --device {{.DEVICE}}
logs-usb:
desc: Stream device logs over USB (set PORT=/dev/cu.wchusbserial...)
deps: [install]
requires:
vars: [PORT]
cmds:
- esphome logs {{.CONFIG}} --device {{.PORT}}
dashboard:
desc: Run a local ESPHome dashboard on http://localhost:6052
deps: [install]
cmds:
- esphome dashboard firmware/
clean:
desc: Remove build artifacts
cmds:
- rm -rf firmware/.esphome
5091ade64This file is pinned to the selected release. Download the original to open it in your design tool.