ESPHome  2024.10.2
valve_traits.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace esphome {
4 namespace valve {
5 
6 class ValveTraits {
7  public:
8  ValveTraits() = 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_toggle() const { return this->supports_toggle_; }
15  void set_supports_toggle(bool supports_toggle) { this->supports_toggle_ = supports_toggle; }
16  bool get_supports_stop() const { return this->supports_stop_; }
17  void set_supports_stop(bool supports_stop) { this->supports_stop_ = supports_stop; }
18 
19  protected:
20  bool is_assumed_state_{false};
21  bool supports_position_{false};
22  bool supports_toggle_{false};
23  bool supports_stop_{false};
24 };
25 
26 } // namespace valve
27 } // namespace esphome
bool get_supports_stop() const
Definition: valve_traits.h:16
bool get_supports_toggle() const
Definition: valve_traits.h:14
void set_supports_stop(bool supports_stop)
Definition: valve_traits.h:17
bool get_is_assumed_state() const
Definition: valve_traits.h:10
bool get_supports_position() const
Definition: valve_traits.h:12
void set_is_assumed_state(bool is_assumed_state)
Definition: valve_traits.h:11
void set_supports_position(bool supports_position)
Definition: valve_traits.h:13
void set_supports_toggle(bool supports_toggle)
Definition: valve_traits.h:15
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7