1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-13 22:30:31 +01:00
esphome/tests/test12.2.yaml
2024-05-16 19:29:18 +02:00

100 lines
1.7 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
then:
- switch.toggle: gpio_15
output:
- platform: gpio
pin:
number: 14
inverted: true
mode:
output: true
id: rest_gpio
dfu_mode:
reset_output: rest_gpio
ota:
- platform: zephyr_mcumgr
usb_cdc: 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
zephyr_debug:
debug:
sensor:
- platform: uptime
name: Uptime Sensor
update_interval: 5sec
- platform: adc
pin: VDDHDIV5
name: "VDDH Voltage"
update_interval: 5sec
filters:
- multiply: 5
- platform: adc
pin: VDD
name: "VDD Voltage"
update_interval: 5sec
- platform: adc
pin: AIN0
name: "AIN0 Voltage"
update_interval: 5sec