Add support for controlling fan direction (#1051)

* Fix fan oscillation trait not being used

* Add fan direction support to SpeedFan

* Add fan direction to API

* Add fan direction support to BinaryFan

* Fix CI errors

* Fix python format

* Change some ordering to trigger CI

* Add test for the configuration
This commit is contained in:
Jim Persson
2020-06-14 21:54:31 +02:00
committed by GitHub
parent 35a2258f12
commit 0bb81e5b2d
16 changed files with 156 additions and 17 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ namespace tuya {
static const char *TAG = "tuya.fan";
void TuyaFan::setup() {
auto traits = fan::FanTraits(this->oscillation_id_.has_value(), this->speed_id_.has_value());
auto traits = fan::FanTraits(this->oscillation_id_.has_value(), this->speed_id_.has_value(), false);
this->fan_->set_traits(traits);
if (this->speed_id_.has_value()) {