[scd4x] Use a user provided default constructor for PerformForcedCalibrationAction (#19176)

This commit is contained in:
J. Nick Koston
2026-09-16 18:21:58 +12:00
committed by GitHub
parent 2fde80454f
commit 511095d3da
+4
View File
@@ -9,6 +9,10 @@ namespace esphome::scd4x {
template<typename... Ts>
class PerformForcedCalibrationAction final : public Action<Ts...>, public Parented<SCD4XComponent> {
public:
// User provided, not "= default": `new(p) PerformForcedCalibrationAction()` would zero-fill .bss that is already
// zero.
PerformForcedCalibrationAction() {}
void play(const Ts &...x) override {
if (this->value_.has_value()) {
this->parent_->perform_forced_calibration(this->value_.value(x...));