mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
Don't compile state_to_string()
unless debugging. (#7473)
This commit is contained in:
parent
4cdc804c17
commit
289aedcfe2
@ -371,6 +371,7 @@ void Rtttl::finish_() {
|
|||||||
ESP_LOGD(TAG, "Playback finished");
|
ESP_LOGD(TAG, "Playback finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG
|
||||||
static const LogString *state_to_string(State state) {
|
static const LogString *state_to_string(State state) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case STATE_STOPPED:
|
case STATE_STOPPED:
|
||||||
@ -387,6 +388,7 @@ static const LogString *state_to_string(State state) {
|
|||||||
return LOG_STR("UNKNOWN");
|
return LOG_STR("UNKNOWN");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
void Rtttl::set_state_(State state) {
|
void Rtttl::set_state_(State state) {
|
||||||
State old_state = this->state_;
|
State old_state = this->state_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user