[xiaomi_rtcgq02lm] Drop unused capture from timeout lambdas (#14959)

This commit is contained in:
J. Nick Koston
2026-03-19 08:41:15 -10:00
committed by GitHub
parent 40a65d36b4
commit 2ca6681896
@@ -58,15 +58,13 @@ bool XiaomiRTCGQ02LM::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
#ifdef USE_BINARY_SENSOR
if (res->has_motion.has_value() && this->motion_ != nullptr) {
this->motion_->publish_state(*res->has_motion);
this->set_timeout("motion_timeout", this->motion_timeout_,
[this, res]() { this->motion_->publish_state(false); });
this->set_timeout("motion_timeout", this->motion_timeout_, [this]() { this->motion_->publish_state(false); });
}
if (res->is_light.has_value() && this->light_ != nullptr)
this->light_->publish_state(*res->is_light);
if (res->button_press.has_value() && this->button_ != nullptr) {
this->button_->publish_state(*res->button_press);
this->set_timeout("button_timeout", this->button_timeout_,
[this, res]() { this->button_->publish_state(false); });
this->set_timeout("button_timeout", this->button_timeout_, [this]() { this->button_->publish_state(false); });
}
#endif
#ifdef USE_SENSOR