Source code for switchbot_utility.switchbot_ir_fan

from .switchbot_ir_device import SwitchbotIrDevice


[docs]class IrFan(SwitchbotIrDevice): """Switchbot virtual IR fan""" def __init__(self, deviceId): super().__init__(deviceId)
[docs] def swing(self) -> str: """Swing""" self._body["command"] = "swing" result = self.command(self.deviceId, self._body) return result.text
[docs] def timer(self) -> str: """Set timer""" self._body["command"] = "timer" result = self.command(self.deviceId, self._body) return result.text
[docs] def low_speed(self) -> str: """set fan speed to low""" self._body["command"] = "lowSpeed" result = self.command(self.deviceId, self._body) return result.text
[docs] def middle_speed(self) -> str: """set fan speed to middle""" self._body["command"] = "middleSpeed" result = self.command(self.deviceId, self._body) return result.text
[docs] def high_speed(self) -> str: """set fan speed to high""" self._body["command"] = "highSpeed" result = self.command(self.deviceId, self._body) return result.text