27 return this->last_non_swing_vane_mode_;
41 return this->last_non_swing_wide_vane_mode_;
47 if (this->supported_swing_modes_.
empty()) {
51 bool vertical_swinging =
false;
52 bool horizontal_swinging =
false;
55 vertical_swinging =
true;
57 this->last_non_swing_vane_mode_ = vane_mode;
62 horizontal_swinging =
true;
64 this->last_non_swing_wide_vane_mode_ = wide_vane_mode;
68 if (vertical_swinging && horizontal_swinging) {
71 if (vertical_swinging) {
74 if (horizontal_swinging) {
constexpr size_t count(ValueType value) const
Check if the set contains a specific value (std::set compatibility) Returns 1 if present,...
constexpr bool empty() const
Check if the set is empty.
void set_supported_swing_modes(const climate::ClimateSwingModeMask &supported_swing_modes)
std::optional< climate::ClimateSwingMode > update_and_get_swing_mode(MitsubishiCN105::VaneMode vane_mode, MitsubishiCN105::WideVaneMode wide_vane_mode)
const climate::ClimateSwingModeMask & supported_swing_modes() const
std::optional< MitsubishiCN105::WideVaneMode > wide_vane_from(climate::ClimateSwingMode swing_mode) const
std::optional< MitsubishiCN105::VaneMode > vane_from(climate::ClimateSwingMode swing_mode) const
ClimateSwingMode swing_mode
ClimateSwingMode
Enum for all modes a climate swing can be in NOTE: If adding values, update ClimateSwingModeMask in c...
@ CLIMATE_SWING_OFF
The swing mode is set to Off.
@ CLIMATE_SWING_HORIZONTAL
The fan mode is set to Horizontal.
@ CLIMATE_SWING_VERTICAL
The fan mode is set to Vertical.
@ CLIMATE_SWING_BOTH
The fan mode is set to Both.