From 99c6a10b995c711b79ac1da9ec87a03a7803bd9e Mon Sep 17 00:00:00 2001 From: Frantz Date: Tue, 30 Jan 2018 00:56:55 +0200 Subject: [PATCH] Set default values for Daikin devices that don't support fan direction and fan speed features (#12000) --- homeassistant/components/climate/daikin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant/components/climate/daikin.py b/homeassistant/components/climate/daikin.py index 1f38fdf3c82..fea1fcee3a3 100644 --- a/homeassistant/components/climate/daikin.py +++ b/homeassistant/components/climate/daikin.py @@ -98,10 +98,16 @@ class DaikinClimate(ClimateDevice): daikin_attr = HA_ATTR_TO_DAIKIN[ATTR_FAN_MODE] if self._api.device.values.get(daikin_attr) is not None: self._supported_features |= SUPPORT_FAN_MODE + else: + # even devices without support must have a default valid value + self._api.device.values[daikin_attr] = 'A' daikin_attr = HA_ATTR_TO_DAIKIN[ATTR_SWING_MODE] if self._api.device.values.get(daikin_attr) is not None: self._supported_features |= SUPPORT_SWING_MODE + else: + # even devices without support must have a default valid value + self._api.device.values[daikin_attr] = '0' def get(self, key): """Retrieve device settings from API library cache."""