mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 11:44:13 +01:00
6fe22a7e62
* Add fan action to SPS30 * add codeowner
21 lines
454 B
C++
21 lines
454 B
C++
#pragma once
|
|
|
|
#include "esphome/core/component.h"
|
|
#include "esphome/core/automation.h"
|
|
#include "sps30.h"
|
|
|
|
namespace esphome {
|
|
namespace sps30 {
|
|
|
|
template<typename... Ts> class StartFanAction : public Action<Ts...> {
|
|
public:
|
|
explicit StartFanAction(SPS30Component *sps30) : sps30_(sps30) {}
|
|
|
|
void play(Ts... x) override { this->sps30_->start_fan_cleaning(); }
|
|
|
|
protected:
|
|
SPS30Component *sps30_;
|
|
};
|
|
|
|
} // namespace sps30
|
|
} // namespace esphome
|