-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
logger.yaml
68 lines (65 loc) · 2.28 KB
/
logger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Enable logging
logger:
# level: ERROR #NONE# ERROR #INFO #DEBUG #VERBOSE
level: DEBUG #NONE# ERROR #INFO #DEBUG #VERBOSE
#baud_rate: 0 #to disable logging via UART
logs:
adc: NONE
sensor: ERROR
binary_sensor: INFO
cover: INFO
switch: INFO
climate: INFO
endstop : DEBUG
text_sensor : ERROR
homeassistant.sensor: ERROR
gpio : NONE
esp-idf : NONE
web_server_idf : NONE
status_led : NONE
dallas.temp.sensor: ERROR
gpio.one_wire: INFO
esp32.preferences: NONE
safe_mode: NONE
### custom
heat_ctrl_main: DEBUG # Log level for the heating controller main
heat_ctrl_pos: DEBUG # Log level for the heating controller channel position
heat_ctrl_bemf: DEBUG # Log level for heating controller BEMF
# on_message:
# level: DEBUG
# then:
# - text_sensor.template.publish:
# id: ${id_prefix}main_logs
# state: !lambda |-
# if (level == 5 && tag == "gpio.one_wire") {
# const char* msg = message;
# const char* search_str = "[gpio.one_wire:082]: ";
# const char* pos = strstr(msg, search_str);
# if (pos) {
# pos += strlen(search_str); // Skip "[gpio.one_wire:082]: "
# // Check for "[0m" at the end (color code)
# size_t len = strlen(pos);
# if (len >= 3 && strcmp(pos + len - 3, "[0m") == 0) {
# len -= 3;
# }
# // Return the truncated message
# return std::string(pos, len);
# }
# }
# return "";
text_sensor:
- platform: template
name: "${friendly_name} main logs"
entity_category: diagnostic
icon: mdi:math-log
id: ${id_prefix}main_logs
- platform: template
name: "${friendly_name} position logs"
entity_category: diagnostic
icon: mdi:math-log
id: ${id_prefix}position_logs
- platform: template
name: "${friendly_name} bemf logs"
entity_category: diagnostic
icon: mdi:math-log
id: ${id_prefix}bemf_logs