[uptime] Pass known length to publish_state to avoid redundant strlen (#15410)

This commit is contained in:
J. Nick Koston
2026-04-03 08:28:07 -10:00
committed by GitHub
parent f2a0d9943d
commit 38f4dc3217
@@ -70,7 +70,7 @@ void UptimeTextSensor::update() {
if (show_seconds)
append_unit(buf, sizeof(buf), pos, this->separator_, seconds, this->seconds_text_);
this->publish_state(buf);
this->publish_state(buf, pos);
}
float UptimeTextSensor::get_setup_priority() const { return setup_priority::HARDWARE; }