Fixes
This commit is contained in:
parent
97450423d3
commit
47a6359f6c
18
automation.cpp
Normal file
18
automation.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/automation.h"
|
||||
#include "esphome/components/switch/switch.h"
|
||||
|
||||
namespace esphome {
|
||||
|
||||
template<typename... Ts> class SetTemperatureAction : public Action<Ts...> {
|
||||
public:
|
||||
explicit SetTemperatureAction(Marlin2 *a_marlin2) : switch_(a_marlin2) {}
|
||||
|
||||
void play(Ts... x) override { this->switch_->turn_on(); }
|
||||
|
||||
protected:
|
||||
Switch *switch_;
|
||||
};
|
||||
} // namespace esphome
|
8
automation.h
Normal file
8
automation.h
Normal file
@ -0,0 +1,8 @@
|
||||
#include "automation.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
|
||||
static const char *const TAG = "switch.automation";
|
||||
|
||||
} // namespace esphome
|
Loading…
Reference in New Issue
Block a user