mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-06 21:09:53 +02:00
add support for Sen5x sensor series (#3383)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/automation.h"
|
||||
#include "sen5x.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace sen5x {
|
||||
|
||||
template<typename... Ts> class StartFanAction : public Action<Ts...> {
|
||||
public:
|
||||
explicit StartFanAction(SEN5XComponent *sen5x) : sen5x_(sen5x) {}
|
||||
|
||||
void play(Ts... x) override { this->sen5x_->start_fan_cleaning(); }
|
||||
|
||||
protected:
|
||||
SEN5XComponent *sen5x_;
|
||||
};
|
||||
|
||||
} // namespace sen5x
|
||||
} // namespace esphome
|
||||
Reference in New Issue
Block a user