ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
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
6namespace esphome::aqi {
7
9
11 public:
13 if (type == 0) {
14 return &this->caqi_calculator_;
15 } else if (type == 1) {
16 return &this->aqi_calculator_;
17 }
18
19 return nullptr;
20 }
21
22 protected:
25};
26
27} // namespace esphome::aqi
AbstractAQICalculator * get_calculator(AQICalculatorType type)
uint16_t type