mirror of
https://github.com/esphome/esphome.git
synced 2026-02-06 01:22:47 +08:00
[dallas_temp] Use const char* for set_timeout to fix deprecation warning and heap churn (#13250)
This commit is contained in:
committed by
Jonathan Swoboda
parent
f88e8fc43b
commit
973fc4c5dc
@@ -44,7 +44,7 @@ void DallasTemperatureSensor::update() {
|
||||
|
||||
this->send_command_(DALLAS_COMMAND_START_CONVERSION);
|
||||
|
||||
this->set_timeout(this->get_address_name(), this->millis_to_wait_for_conversion_(), [this] {
|
||||
this->set_timeout(this->get_address_name().c_str(), this->millis_to_wait_for_conversion_(), [this] {
|
||||
if (!this->read_scratch_pad_() || !this->check_scratch_pad_()) {
|
||||
this->publish_state(NAN);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user