ESPHome  2022.11.3
cover_traits.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace esphome {
4 namespace cover {
5 
6 class CoverTraits {
7  public:
8  CoverTraits() = default;
9 
10  bool get_is_assumed_state() const { return this->is_assumed_state_; }
11  void set_is_assumed_state(bool is_assumed_state) { this->is_assumed_state_ = is_assumed_state; }
12  bool get_supports_position() const { return this->supports_position_; }
13  void set_supports_position(bool supports_position) { this->supports_position_ = supports_position; }
14  bool get_supports_tilt() const { return this->supports_tilt_; }
15  void set_supports_tilt(bool supports_tilt) { this->supports_tilt_ = supports_tilt; }
16  bool get_supports_toggle() const { return this->supports_toggle_; }
17  void set_supports_toggle(bool supports_toggle) { this->supports_toggle_ = supports_toggle; }
18 
19  protected:
20  bool is_assumed_state_{false};
21  bool supports_position_{false};
22  bool supports_tilt_{false};
23  bool supports_toggle_{false};
24 };
25 
26 } // namespace cover
27 } // namespace esphome
bool get_supports_position() const
Definition: cover_traits.h:12
void set_supports_toggle(bool supports_toggle)
Definition: cover_traits.h:17
void set_supports_tilt(bool supports_tilt)
Definition: cover_traits.h:15
void set_is_assumed_state(bool is_assumed_state)
Definition: cover_traits.h:11
void set_supports_position(bool supports_position)
Definition: cover_traits.h:13
bool get_supports_tilt() const
Definition: cover_traits.h:14
Definition: a4988.cpp:4
bool get_supports_toggle() const
Definition: cover_traits.h:16
bool get_is_assumed_state() const
Definition: cover_traits.h:10