From 5bdbf3dfc03258e4801a53ffd564e573afff1ab8 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 29 Jan 2018 15:40:08 -0800 Subject: [PATCH 1/9] Version bump to 0.62.1 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 9fed3acc90c9c4cd585069ccf21ab050cbc8d416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 27 Jan 2018 16:20:28 +0200 Subject: [PATCH 3/9] Fix asuswrt AttributeError on neigh for unknown device (#11960) --- homeassistant/components/device_tracker/asuswrt.py | 3 ++- tests/components/device_tracker/test_asuswrt.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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/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())) From 8709a397f6823551394d6779b420847f575234a6 Mon Sep 17 00:00:00 2001 From: Frantz Date: Tue, 30 Jan 2018 00:56:55 +0200 Subject: [PATCH 4/9] 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.""" From e084a260c610bac888c9f4f1dea9acb15242558a Mon Sep 17 00:00:00 2001 From: smoldaner Date: Tue, 30 Jan 2018 00:02:26 +0100 Subject: [PATCH 5/9] Fix parameter escaping (#12008) From rfc3986: The characters slash ("/") and question mark ("?") may represent data within the query component See https://tools.ietf.org/html/rfc3986#section-3.4 --- homeassistant/components/media_player/squeezebox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 170a0c9888d803e49c58fe8f3dcae9fc1138ea1d Mon Sep 17 00:00:00 2001 From: Rene Nulsch <33263735+ReneNulschDE@users.noreply.github.com> Date: Mon, 29 Jan 2018 23:49:38 +0100 Subject: [PATCH 6/9] Error handling, in case no connections are available (#12010) * Error handling, in case no connections are available * Fix elif to if --- homeassistant/components/sensor/deutsche_bahn.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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. From a59d26b1faee871bbf8ce7061ba9b05b3aaa05da Mon Sep 17 00:00:00 2001 From: c727 Date: Mon, 29 Jan 2018 23:18:33 +0100 Subject: [PATCH 7/9] Fix 404 for Hass.io panel using frontend dev (#12039) * Fix 404 for Hass.io panel using frontend dev * Hound --- homeassistant/components/frontend/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 8f5a18ff843..70f203d2df2 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -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), From a1c0544e3512a19332e76a32b58aca8e433edb82 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Tue, 30 Jan 2018 00:54:49 +0100 Subject: [PATCH 8/9] Upgrade pyharmony to 1.0.20 (#12043) --- homeassistant/components/remote/harmony.py | 7 ++++--- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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/requirements_all.txt b/requirements_all.txt index aa3c654a7ca..42b7e23aa06 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 From 6f84fa4ce5969138a2a09f5c7c7fc937d5b20093 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 29 Jan 2018 15:51:43 -0800 Subject: [PATCH 9/9] Bump frontend to 20180130.0 --- homeassistant/components/frontend/__init__.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 70f203d2df2..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'] diff --git a/requirements_all.txt b/requirements_all.txt index 42b7e23aa06..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 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