ESPHome  2024.7.2
aqi_calculator_factory.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "caqi_calculator.h"
4 #include "aqi_calculator.h"
5 
6 namespace esphome {
7 namespace hm3301 {
8 
10 
12  public:
14  if (type == 0) {
15  return caqi_calculator_;
16  } else if (type == 1) {
17  return aqi_calculator_;
18  }
19 
20  return nullptr;
21  }
22 
23  protected:
26 };
27 
28 } // namespace hm3301
29 } // namespace esphome
AbstractAQICalculator * get_calculator(AQICalculatorType type)
uint8_t type
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7