Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daikin fixes #18415

Merged
merged 2 commits into from Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 1 addition & 7 deletions homeassistant/components/climate/daikin.py
Expand Up @@ -22,7 +22,7 @@
ATTR_TEMPERATURE, CONF_HOST, CONF_NAME, TEMP_CELSIUS)
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['pydaikin==0.4']
REQUIREMENTS = ['pydaikin==0.6']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -105,16 +105,10 @@ def __init__(self, api):
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."""
Expand Down
8 changes: 2 additions & 6 deletions homeassistant/components/daikin.py
Expand Up @@ -19,12 +19,11 @@
from homeassistant.helpers.discovery import load_platform
from homeassistant.util import Throttle

REQUIREMENTS = ['pydaikin==0.4']
REQUIREMENTS = ['pydaikin==0.6']

_LOGGER = logging.getLogger(__name__)

DOMAIN = 'daikin'
HTTP_RESOURCES = ['aircon/get_sensor_info', 'aircon/get_control_info']

ATTR_TARGET_TEMPERATURE = 'target_temperature'
ATTR_INSIDE_TEMPERATURE = 'inside_temperature'
Expand Down Expand Up @@ -128,10 +127,7 @@ def __init__(self, device, name):
def update(self, **kwargs):
"""Pull the latest data from Daikin."""
try:
for resource in HTTP_RESOURCES:
self.device.values.update(
self.device.get_resource(resource)
)
self.device.update_status()
except timeout:
_LOGGER.warning(
"Connection failed for %s", self.ip_address
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Expand Up @@ -880,7 +880,7 @@ pycsspeechtts==1.0.2

# homeassistant.components.daikin
# homeassistant.components.climate.daikin
pydaikin==0.4
pydaikin==0.6

# homeassistant.components.deconz
pydeconz==47
Expand Down