mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 02:28:42 +00:00
[scd4x] Use a user provided default constructor for PerformForcedCalibrationAction (#19176)
This commit is contained in:
@@ -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...));
|
||||
|
||||
Reference in New Issue
Block a user