mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Set default values for Daikin devices that don't support fan direction and fan speed features (#12000)
This commit is contained in:
parent
7ad870c4ff
commit
99c6a10b99
@ -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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user