ESPHome  2024.10.2
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  bool get_supports_stop() const { return this->supports_stop_; }
19  void set_supports_stop(bool supports_stop) { this->supports_stop_ = supports_stop; }
20 
21  protected:
22  bool is_assumed_state_{false};
23  bool supports_position_{false};
24  bool supports_tilt_{false};
25  bool supports_toggle_{false};
26  bool supports_stop_{false};
27 };
28 
29 } // namespace cover
30 } // namespace esphome
void set_supports_stop(bool supports_stop)
Definition: cover_traits.h:19
bool get_supports_stop() const
Definition: cover_traits.h:18
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
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
bool get_supports_toggle() const
Definition: cover_traits.h:16
bool get_is_assumed_state() const
Definition: cover_traits.h:10