Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
27 lines
787 B
C++
27 lines
787 B
C++
#pragma once
|
|
|
|
#include "esphome/core/automation.h"
|
|
#include "esphome/core/helpers.h"
|
|
#include "sps30.h"
|
|
|
|
namespace esphome {
|
|
namespace sps30 {
|
|
|
|
template<typename... Ts> class StartFanAction : public Action<Ts...>, public Parented<SPS30Component> {
|
|
public:
|
|
void play(const Ts &...x) override { this->parent_->start_fan_cleaning(); }
|
|
};
|
|
|
|
template<typename... Ts> class StartMeasurementAction : public Action<Ts...>, public Parented<SPS30Component> {
|
|
public:
|
|
void play(const Ts &...x) override { this->parent_->start_measurement(); }
|
|
};
|
|
|
|
template<typename... Ts> class StopMeasurementAction : public Action<Ts...>, public Parented<SPS30Component> {
|
|
public:
|
|
void play(const Ts &...x) override { this->parent_->stop_measurement(); }
|
|
};
|
|
|
|
} // namespace sps30
|
|
} // namespace esphome
|