mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:27:14 +00:00
23 lines
536 B
YAML
23 lines
536 B
YAML
esphome:
|
|
name: scheduler-blocking-warning
|
|
on_boot:
|
|
then:
|
|
- script.execute: blocking_script
|
|
|
|
host:
|
|
api:
|
|
logger:
|
|
level: DEBUG
|
|
|
|
# The busy-block runs in the second delay's continuation; the warning must name the script. Two
|
|
# delays verify the source survives chained delays (the scheduler republishes it each continuation).
|
|
script:
|
|
- id: blocking_script
|
|
then:
|
|
- delay: 10ms
|
|
- delay: 10ms
|
|
- lambda: |-
|
|
const uint32_t start = millis();
|
|
while (millis() - start < 80) {
|
|
}
|