[uptime] Pass known length to publish_state to avoid redundant strlen

This commit is contained in:
J. Nick Koston
2026-04-02 15:11:00 -10:00
parent 710186998b
commit 288d98f5ef
@@ -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; }