[prometheus] Use current_option() instead of deprecated .state for select entities (#12079)

This commit is contained in:
J. Nick Koston
2025-11-24 13:45:29 -06:00
committed by GitHub
parent a0440603b7
commit 909baf5e7a

View File

@@ -726,7 +726,7 @@ void PrometheusHandler::select_row_(AsyncResponseStream *stream, select::Select
stream->print(ESPHOME_F("\",name=\""));
stream->print(relabel_name_(obj).c_str());
stream->print(ESPHOME_F("\",value=\""));
stream->print(obj->state.c_str());
stream->print(obj->current_option());
stream->print(ESPHOME_F("\"} "));
stream->print(ESPHOME_F("1.0"));
stream->print(ESPHOME_F("\n"));