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.""" diff --git a/homeassistant/components/device_tracker/asuswrt.py b/homeassistant/components/device_tracker/asuswrt.py index 0d27c4b5efd..2196dd78fdb 100644 --- a/homeassistant/components/device_tracker/asuswrt.py +++ b/homeassistant/components/device_tracker/asuswrt.py @@ -214,7 +214,8 @@ class AsusWrtDeviceScanner(DeviceScanner): for device in result: if device['mac'] is not None: mac = device['mac'].upper() - old_ip = cur_devices.get(mac, {}).ip or None + old_device = cur_devices.get(mac) + old_ip = old_device.ip if old_device else None devices[mac] = Device(mac, device.get('ip', old_ip), None) return devices diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 8f5a18ff843..a601dcbdc51 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -23,7 +23,7 @@ from homeassistant.const import CONF_NAME, EVENT_THEMES_UPDATED from homeassistant.core import callback from homeassistant.loader import bind_hass -REQUIREMENTS = ['home-assistant-frontend==20180126.0', 'user-agents==1.1.0'] +REQUIREMENTS = ['home-assistant-frontend==20180130.0', 'user-agents==1.1.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log'] @@ -300,7 +300,8 @@ def async_setup(hass, config): if is_dev: for subpath in ["src", "build-translations", "build-temp", "build", - "hass_frontend", "bower_components", "panels"]: + "hass_frontend", "bower_components", "panels", + "hassio"]: hass.http.register_static_path( "/home-assistant-polymer/{}".format(subpath), os.path.join(repo_path, subpath), diff --git a/homeassistant/components/media_player/squeezebox.py b/homeassistant/components/media_player/squeezebox.py index 13f05cc59f7..22f701de1cc 100644 --- a/homeassistant/components/media_player/squeezebox.py +++ b/homeassistant/components/media_player/squeezebox.py @@ -494,5 +494,5 @@ class SqueezeBoxDevice(MediaPlayerDevice): all_params = [command] if parameters: for parameter in parameters: - all_params.append(urllib.parse.quote(parameter, safe=':=')) + all_params.append(urllib.parse.quote(parameter, safe=':=/?')) return self.async_query(*all_params) diff --git a/homeassistant/components/remote/harmony.py b/homeassistant/components/remote/harmony.py index 89cdc7529cb..39f09ea66a2 100644 --- a/homeassistant/components/remote/harmony.py +++ b/homeassistant/components/remote/harmony.py @@ -17,9 +17,10 @@ from homeassistant.components.remote import ( from homeassistant.const import ( ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_PORT, EVENT_HOMEASSISTANT_STOP) import homeassistant.helpers.config_validation as cv +from homeassistant.exceptions import PlatformNotReady from homeassistant.util import slugify -REQUIREMENTS = ['pyharmony==1.0.18'] +REQUIREMENTS = ['pyharmony==1.0.20'] _LOGGER = logging.getLogger(__name__) @@ -97,8 +98,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None): DEVICES.append(device) add_devices([device]) register_services(hass) - except ValueError: - _LOGGER.warning("Failed to initialize remote: %s", name) + except (ValueError, AttributeError): + raise PlatformNotReady def register_services(hass): diff --git a/homeassistant/components/sensor/deutsche_bahn.py b/homeassistant/components/sensor/deutsche_bahn.py index c13fc930ed1..278cf5382c1 100644 --- a/homeassistant/components/sensor/deutsche_bahn.py +++ b/homeassistant/components/sensor/deutsche_bahn.py @@ -67,15 +67,17 @@ class DeutscheBahnSensor(Entity): def device_state_attributes(self): """Return the state attributes.""" connections = self.data.connections[0] - connections['next'] = self.data.connections[1]['departure'] - connections['next_on'] = self.data.connections[2]['departure'] + if len(self.data.connections) > 1: + connections['next'] = self.data.connections[1]['departure'] + if len(self.data.connections) > 2: + connections['next_on'] = self.data.connections[2]['departure'] return connections def update(self): """Get the latest delay from bahn.de and updates the state.""" self.data.update() self._state = self.data.connections[0].get('departure', 'Unknown') - if self.data.connections[0]['delay'] != 0: + if self.data.connections[0].get('delay', 0) != 0: self._state += " + {}".format(self.data.connections[0]['delay']) @@ -96,6 +98,9 @@ class SchieneData(object): self.connections = self.schiene.connections( self.start, self.goal, dt_util.as_local(dt_util.utcnow())) + if not self.connections: + self.connections = [{}] + for con in self.connections: # Detail info is not useful. Having a more consistent interface # simplifies usage of template sensors. diff --git a/homeassistant/const.py b/homeassistant/const.py index 5682a65ab7d..6470f50d460 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 62 -PATCH_VERSION = '0' +PATCH_VERSION = '1' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) diff --git a/requirements_all.txt b/requirements_all.txt index aa3c654a7ca..ad6602464a6 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -352,7 +352,7 @@ hipnotify==1.0.8 holidays==0.9.3 # homeassistant.components.frontend -home-assistant-frontend==20180126.0 +home-assistant-frontend==20180130.0 # homeassistant.components.camera.onvif http://github.com/tgaugry/suds-passworddigest-py3/archive/86fc50e39b4d2b8997481967d6a7fe1c57118999.zip#suds-passworddigest-py3==0.1.2a @@ -723,7 +723,7 @@ pyflexit==0.3 pyfttt==0.3 # homeassistant.components.remote.harmony -pyharmony==1.0.18 +pyharmony==1.0.20 # homeassistant.components.binary_sensor.hikvision pyhik==0.1.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index f21a20f7439..c162dc2fd02 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -75,7 +75,7 @@ hbmqtt==0.9.1 holidays==0.9.3 # homeassistant.components.frontend -home-assistant-frontend==20180126.0 +home-assistant-frontend==20180130.0 # homeassistant.components.influxdb # homeassistant.components.sensor.influxdb diff --git a/tests/components/device_tracker/test_asuswrt.py b/tests/components/device_tracker/test_asuswrt.py index 808d3569b8b..6e646e9862d 100644 --- a/tests/components/device_tracker/test_asuswrt.py +++ b/tests/components/device_tracker/test_asuswrt.py @@ -447,6 +447,9 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase): scanner = get_scanner(self.hass, VALID_CONFIG_ROUTER_SSH) scanner.connection = mocked_ssh self.assertEqual(NEIGH_DEVICES, scanner._get_neigh(ARP_DEVICES.copy())) + self.assertEqual(NEIGH_DEVICES, scanner._get_neigh({ + 'UN:KN:WN:DE:VI:CE': Device('UN:KN:WN:DE:VI:CE', None, None), + })) mocked_ssh.run_command.return_value = '' self.assertEqual({}, scanner._get_neigh(ARP_DEVICES.copy()))