This commit is contained in:
Tomasz Duda 2024-02-13 19:52:02 +01:00
parent 84a84b04a6
commit 9027cebeeb

View File

@ -1,14 +1,20 @@
--- ---
nrf52: nrf52:
board: nrf52840 # board: adafruit_itsybitsy_nrf52840
board: adafruit_feather_nrf52840
framework: framework:
type: zephyr type: zephyr
variant: nrf-sdk variant: nrf-sdk
# bootloader: adafruit
# bootloader: mcuboot
esphome: esphome:
name: nrf52-test-zephyr name: nrf52-test-zephyr
logger: logger:
# level: DEBUG
# logs:
# switch: NONE
switch: switch:
- platform: gpio - platform: gpio
@ -29,12 +35,6 @@ interval:
# name: Uptime Sensor # name: Uptime Sensor
# update_interval: 5s # update_interval: 5s
# shell:
# ipsp:
# otbr:
output: output:
- platform: gpio - platform: gpio
pin: pin:
@ -47,3 +47,31 @@ output:
dfu: dfu:
reset_output: rest_gpio 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: