Add turn_on/off to tfiac (#27712)

* Add turn_on/off to tfiac

* fix ws issue
This commit is contained in:
Fredrik Erlandsson 2019-11-08 17:02:44 +01:00 committed by Martin Hjelmare
parent bd54ff3c02
commit cffadf919a

View file

@ -189,3 +189,11 @@ class TfiacClimate(ClimateDevice):
async def async_set_swing_mode(self, swing_mode):
"""Set new swing mode."""
await self._client.set_swing(swing_mode.capitalize())
async def async_turn_on(self):
"""Turn device on."""
await self._client.set_state(OPERATION_MODE)
async def async_turn_off(self):
"""Turn device off."""
await self._client.set_state(ON_MODE, "off")