esphome/tests/test12.2.yaml
2024-03-05 21:00:52 +01:00

74 lines
1.2 KiB
YAML

---
nrf52:
# board: adafruit_itsybitsy_nrf52840
board: adafruit_feather_nrf52840
# board: nrf52840dk_nrf52840
# board: nrf5340dk_nrf5340_cpuapp
# 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
restore_mode: RESTORE_DEFAULT_OFF
interval:
- interval: 500ms
# - interval: 20s
then:
- switch.toggle: gpio_15
output:
- platform: gpio
pin:
number: 14
inverted: true
mode:
output: true
id: 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:
zephyr_ble_nus:
log: true