mirror of
https://github.com/esphome/esphome.git
synced 2024-11-18 11:06:11 +01:00
78 lines
1.2 KiB
YAML
78 lines
1.2 KiB
YAML
---
|
|
nrf52:
|
|
# board: adafruit_itsybitsy_nrf52840
|
|
board: adafruit_feather_nrf52840
|
|
framework:
|
|
type: zephyr
|
|
variant: nrf-sdk
|
|
# bootloader: adafruit
|
|
# bootloader: mcuboot
|
|
|
|
esphome:
|
|
name: nrf52-test-nrf
|
|
|
|
logger:
|
|
level: DEBUG
|
|
logs:
|
|
switch: NONE
|
|
|
|
switch:
|
|
- platform: gpio
|
|
pin:
|
|
number: 15
|
|
inverted: true
|
|
mode:
|
|
output: true
|
|
id: gpio_15
|
|
|
|
interval:
|
|
- interval: 500ms
|
|
then:
|
|
- switch.toggle: gpio_15
|
|
|
|
# sensor:
|
|
# - platform: uptime
|
|
# name: Uptime Sensor
|
|
# update_interval: 5s
|
|
|
|
output:
|
|
- platform: gpio
|
|
pin:
|
|
number: 14
|
|
inverted: true
|
|
mode:
|
|
output: true
|
|
id: rest_gpio
|
|
|
|
|
|
dfu:
|
|
reset_output: rest_gpio
|
|
|
|
ota:
|
|
safe_mode: true
|
|
on_begin:
|
|
then:
|
|
- logger.log: "OTA start"
|
|
on_progress:
|
|
then:
|
|
- logger.log:
|
|
format: "OTA progress %0.1f%%"
|
|
args: ["x"]
|
|
on_end:
|
|
then:
|
|
- logger.log: "OTA end"
|
|
on_error:
|
|
then:
|
|
- logger.log:
|
|
format: "OTA update error %d"
|
|
args: ["x"]
|
|
on_state_change:
|
|
then:
|
|
- if:
|
|
condition:
|
|
lambda: return state == ota::OTA_STARTED;
|
|
then:
|
|
- logger.log: "OTA start"
|
|
|
|
zephyr_ble_server:
|