Fix in Daikin.py for set swing_mode and speed (#18013)

pull/18083/head
MatteGary 2018-11-01 10:29:48 +01:00 committed by Fabian Affolter
parent 1c5800d98b
commit ab8299b6cf
1 changed files with 3 additions and 1 deletions

View File

@ -174,8 +174,10 @@ class DaikinClimate(ClimateDevice):
daikin_attr = HA_ATTR_TO_DAIKIN.get(attr)
if daikin_attr is not None:
if value in self._list[attr]:
if attr == ATTR_OPERATION_MODE:
values[daikin_attr] = HA_STATE_TO_DAIKIN[value]
elif value in self._list[attr]:
values[daikin_attr] = value.lower()
else:
_LOGGER.error("Invalid value %s for %s", attr, value)