mirror of
https://github.com/esphome/esphome.git
synced 2025-09-04 12:22:20 +01: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