mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-29 05:20:24 -07:00
Merge pull request #105 from ankushduacodes/add-ankush-dua
Added jet mode functionality to API
This commit is contained in:
commit
9165c19571
25
wideq/ac.py
25
wideq/ac.py
@ -7,6 +7,24 @@ from .util import lookup_enum
|
||||
from .core import FailedRequestError
|
||||
|
||||
|
||||
class ACJetMode(enum.Enum):
|
||||
"""JET mode puts your AC into highest cooling or dry or
|
||||
heat mode(for a certain amount of time) depending on what you choose
|
||||
|
||||
This mode Overrides following setting:
|
||||
1. Vertical swing is set to @100
|
||||
2. Temperature gets set to 18 after jet mode turns off
|
||||
3. Fan speed is set to HIGH (@AC_MAIN_WIND_STRENGTH_HIGH_W)
|
||||
after jet mode turns off
|
||||
"""
|
||||
|
||||
OFF = "@OFF"
|
||||
COOL = "@COOL_JET"
|
||||
HEAT = "@HEAT_JET"
|
||||
DRY = "@DRY_JET_W"
|
||||
HIMALAYAS = "@HIMALAYAS_COOL"
|
||||
|
||||
|
||||
class ACVSwingMode(enum.Enum):
|
||||
"""The vertical swing mode for an AC/HVAC device.
|
||||
|
||||
@ -235,6 +253,13 @@ class ACDevice(Device):
|
||||
|
||||
return self._get_config('DuctZone')
|
||||
|
||||
def set_jet_mode(self, jet_opt):
|
||||
"""Set jet mode to a value from the `ACJetMode` enum.
|
||||
"""
|
||||
|
||||
jet_opt_value = self.model.enum_value('Jet', jet_opt.value)
|
||||
self._set_control('Jet', jet_opt_value)
|
||||
|
||||
def set_fan_speed(self, speed):
|
||||
"""Set the fan speed to a value from the `ACFanSpeed` enum.
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user