mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-23 22:28:28 +02:00
Reduce memory usage with StringRef in MQTT Components (#5719)
This commit is contained in:
@@ -25,7 +25,7 @@ void MQTTBinarySensorComponent::dump_config() {
|
||||
MQTTBinarySensorComponent::MQTTBinarySensorComponent(binary_sensor::BinarySensor *binary_sensor)
|
||||
: binary_sensor_(binary_sensor) {
|
||||
if (this->binary_sensor_->is_status_binary_sensor()) {
|
||||
this->set_custom_state_topic(mqtt::global_mqtt_client->get_availability().topic);
|
||||
this->set_custom_state_topic(mqtt::global_mqtt_client->get_availability().topic.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user