mirror of
https://github.com/esphome/esphome.git
synced 2025-09-01 19:02:18 +01:00
Co-authored-by: Samuel Sieb <samuel@sieb.net> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
19 lines
558 B
YAML
19 lines
558 B
YAML
logger:
|
|
id: logger_id
|
|
level: DEBUG
|
|
on_message:
|
|
- level: DEBUG
|
|
then:
|
|
- lambda: |-
|
|
ESP_LOGD("test", "Got message level %d: %s - %s", level, tag, message);
|
|
- level: WARN
|
|
then:
|
|
- lambda: |-
|
|
ESP_LOGW("test", "Warning level %d from %s", level, tag);
|
|
- level: ERROR
|
|
then:
|
|
- lambda: |-
|
|
// Test that level is uint8_t by using it in calculations
|
|
uint8_t adjusted_level = level + 1;
|
|
ESP_LOGE("test", "Error with adjusted level %d", adjusted_level);
|