TuyaFan control should use oscillation_type (#7776)

Co-authored-by: Peter Hanson <phanson@whistler.lan>
This commit is contained in:
pethans 2024-11-17 10:47:29 -08:00 committed by GitHub
parent b29c119408
commit e81191ebd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,7 @@ void TuyaFan::control(const fan::FanCall &call) {
if (this->oscillation_id_.has_value() && call.get_oscillating().has_value()) { if (this->oscillation_id_.has_value() && call.get_oscillating().has_value()) {
if (this->oscillation_type_ == TuyaDatapointType::ENUM) { if (this->oscillation_type_ == TuyaDatapointType::ENUM) {
this->parent_->set_enum_datapoint_value(*this->oscillation_id_, *call.get_oscillating()); this->parent_->set_enum_datapoint_value(*this->oscillation_id_, *call.get_oscillating());
} else if (this->speed_type_ == TuyaDatapointType::BOOLEAN) { } else if (this->oscillation_type_ == TuyaDatapointType::BOOLEAN) {
this->parent_->set_boolean_datapoint_value(*this->oscillation_id_, *call.get_oscillating()); this->parent_->set_boolean_datapoint_value(*this->oscillation_id_, *call.get_oscillating());
} }
} }