ESPHome  2022.8.0
copy_cover.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace esphome {
7 namespace copy {
8 
9 class CopyCover : public cover::Cover, public Component {
10  public:
11  void set_source(cover::Cover *source) { source_ = source; }
12  void setup() override;
13  void dump_config() override;
14  float get_setup_priority() const override { return setup_priority::DATA; }
15 
16  cover::CoverTraits get_traits() override;
17 
18  protected:
19  void control(const cover::CoverCall &call) override;
20 
22 };
23 
24 } // namespace copy
25 } // namespace esphome
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:18
Base class for all cover devices.
Definition: cover.h:111
void set_source(cover::Cover *source)
Definition: copy_cover.h:11
void setup() override
Definition: copy_cover.cpp:9
cover::Cover * source_
Definition: copy_cover.h:21
float get_setup_priority() const override
Definition: copy_cover.h:14
void control(const cover::CoverCall &call) override
Definition: copy_cover.cpp:37
cover::CoverTraits get_traits() override
Definition: copy_cover.cpp:25
void dump_config() override
Definition: copy_cover.cpp:23
Definition: a4988.cpp:4