1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-16 06:45:48 +00:00

Add climate dry fan (#845)

* add climate dry fan

* clang-format

* updates, add swing mode, add back compat with old ha

* revert client-config add swing

* sort const.py

* fix missing retur
This commit is contained in:
Guillermo Ruffino
2019-11-16 12:34:11 -03:00
committed by Otto Winter
parent 4f8f59f705
commit 1814e4a46b
21 changed files with 824 additions and 85 deletions

View File

@@ -15,6 +15,8 @@ template<typename... Ts> class ControlAction : public Action<Ts...> {
TEMPLATABLE_VALUE(float, target_temperature_low)
TEMPLATABLE_VALUE(float, target_temperature_high)
TEMPLATABLE_VALUE(bool, away)
TEMPLATABLE_VALUE(ClimateFanMode, fan_mode)
TEMPLATABLE_VALUE(ClimateSwingMode, swing_mode)
void play(Ts... x) override {
auto call = this->climate_->make_call();
@@ -23,6 +25,8 @@ template<typename... Ts> class ControlAction : public Action<Ts...> {
call.set_target_temperature_low(this->target_temperature_low_.optional_value(x...));
call.set_target_temperature_high(this->target_temperature_high_.optional_value(x...));
call.set_away(this->away_.optional_value(x...));
call.set_fan_mode(this->fan_mode_.optional_value(x...));
call.set_swing_mode(this->swing_mode_.optional_value(x...));
call.perform();
}