ESPHome  2024.12.2
automation.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include "scd30.h"
6 
7 namespace esphome {
8 namespace scd30 {
9 
10 template<typename... Ts> class ForceRecalibrationWithReference : public Action<Ts...>, public Parented<SCD30Component> {
11  public:
12  void play(Ts... x) override {
13  if (this->value_.has_value()) {
14  this->parent_->force_recalibration_with_reference(this->value_.value(x...));
15  }
16  }
17 
18  protected:
19  TEMPLATABLE_VALUE(uint16_t, value)
20 };
21 
22 } // namespace scd30
23 } // namespace esphome
uint16_t x
Definition: tt21100.cpp:17
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Helper class to easily give an object a parent of type T.
Definition: helpers.h:530