From da5823becbd1b16c34716f219b17e842ecec41e1 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 12 Feb 2017 14:00:06 -0800 Subject: [PATCH 01/16] Make check ha config file work with custom config dir --- homeassistant/config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/config.py b/homeassistant/config.py index 101c1a1dc87..27b9d2956e8 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -466,10 +466,9 @@ def async_check_ha_config_file(hass): import homeassistant.components.persistent_notification as pn proc = yield from asyncio.create_subprocess_exec( - sys.argv[0], - '--script', - 'check_config', - stdout=asyncio.subprocess.PIPE) + sys.executable, '-m', 'homeassistant', '--script', + 'check_config', '--config', hass.config.config_dir, + stdout=asyncio.subprocess.PIPE, loop=hass.loop) # Wait for the subprocess exit (stdout_data, dummy) = yield from proc.communicate() result = yield from proc.wait() From 153e354002037ffae3109b63632d34c7a530cc13 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 12 Feb 2017 14:01:26 -0800 Subject: [PATCH 02/16] Version bump to 0.38.2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 2cbaf395c39..44438fa92d4 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 38 -PATCH_VERSION = '1' +PATCH_VERSION = '2' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) From d3c444ff10a89c6273eb96fbe92c2d43b04683c6 Mon Sep 17 00:00:00 2001 From: Philipp Schmitt Date: Sun, 12 Feb 2017 11:22:55 +0100 Subject: [PATCH 03/16] [lock.nuki] Fix Nuki lock for Python 3.4 and 3.5 (#5899) --- homeassistant/components/lock/nuki.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/lock/nuki.py b/homeassistant/components/lock/nuki.py index b167c00b9bc..33058c86239 100644 --- a/homeassistant/components/lock/nuki.py +++ b/homeassistant/components/lock/nuki.py @@ -14,7 +14,7 @@ from homeassistant.util import Throttle import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['pynuki==1.2'] +REQUIREMENTS = ['pynuki==1.2.1'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 2303b7926c8..a306ac56fac 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -487,7 +487,7 @@ pynetgear==0.3.3 pynetio==0.1.6 # homeassistant.components.lock.nuki -pynuki==1.2 +pynuki==1.2.1 # homeassistant.components.sensor.nut pynut2==2.1.2 From 15ef55a4c8ca9c910d2de51d55a2fc8c4f9f73ff Mon Sep 17 00:00:00 2001 From: happyleavesaoc Date: Sun, 12 Feb 2017 12:49:02 -0500 Subject: [PATCH 04/16] bump myusps version (#5911) --- homeassistant/components/sensor/usps.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/usps.py b/homeassistant/components/sensor/usps.py index 680b4e4142d..5c2bb84daa1 100644 --- a/homeassistant/components/sensor/usps.py +++ b/homeassistant/components/sensor/usps.py @@ -19,7 +19,7 @@ from homeassistant.util import Throttle from homeassistant.util.dt import now, parse_datetime import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['myusps==1.0.2'] +REQUIREMENTS = ['myusps==1.0.3'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index a306ac56fac..527e9a17f54 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -332,7 +332,7 @@ miflora==0.1.15 mutagen==1.36.2 # homeassistant.components.sensor.usps -myusps==1.0.2 +myusps==1.0.3 # homeassistant.components.discovery netdisco==0.8.2 From 8991fcf835cf45677409003e39aa9917426a0b6d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 12 Feb 2017 20:16:06 +0100 Subject: [PATCH 05/16] Fix name (#5912) --- homeassistant/components/mqtt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index e880be177e8..79c154ef223 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -237,7 +237,7 @@ def _setup_discovery(hass, config): _LOGGER.error("Unable to load MQTT discovery") return None - success = discovery.start(hass, conf[CONF_DISCOVERY_PREFIX], config) + success = discovery.async_start(hass, conf[CONF_DISCOVERY_PREFIX], config) return success From 35118b6d9cb26460f7ab68c95fa33a2f9877c1e5 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 12 Feb 2017 21:19:15 +0200 Subject: [PATCH 06/16] Make hdmi_cec work with the new customize (#5916) --- homeassistant/components/hdmi_cec.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/hdmi_cec.py b/homeassistant/components/hdmi_cec.py index a154bdf609e..5ed3b688672 100644 --- a/homeassistant/components/hdmi_cec.py +++ b/homeassistant/components/hdmi_cec.py @@ -21,10 +21,11 @@ from homeassistant.config import load_yaml_config_file from homeassistant.const import (EVENT_HOMEASSISTANT_START, STATE_UNKNOWN, EVENT_HOMEASSISTANT_STOP, STATE_ON, STATE_OFF, CONF_DEVICES, CONF_PLATFORM, - CONF_CUSTOMIZE, STATE_PLAYING, STATE_IDLE, + STATE_PLAYING, STATE_IDLE, STATE_PAUSED, CONF_HOST) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity import Entity +from homeassistant.helpers import customize REQUIREMENTS = ['pyCEC==0.4.13'] @@ -299,10 +300,12 @@ def setup(hass: HomeAssistant, base_config): """Called when new device is detected by HDMI network.""" key = DOMAIN + '.' + device.name hass.data[key] = device - discovery.load_platform(hass, base_config.get(core.DOMAIN).get( - CONF_CUSTOMIZE, {}).get(key, {}).get(CONF_PLATFORM, platform), - DOMAIN, discovered={ATTR_NEW: [key]}, - hass_config=base_config) + discovery.load_platform( + hass, + customize.get_overrides(hass, core.DOMAIN, key).get( + CONF_PLATFORM, platform), + DOMAIN, discovered={ATTR_NEW: [key]}, + hass_config=base_config) def _shutdown(call): hdmi_network.stop() From 1a0a8f106ee4c74eda90cef7875f9921f3009228 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Mon, 13 Feb 2017 00:47:04 +0100 Subject: [PATCH 07/16] Bugfix for #5900 (#5901) --- homeassistant/components/climate/zwave.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/climate/zwave.py b/homeassistant/components/climate/zwave.py index 545d3b41432..e74d5d575a3 100755 --- a/homeassistant/components/climate/zwave.py +++ b/homeassistant/components/climate/zwave.py @@ -97,9 +97,11 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice): self._current_temperature = self.get_value( class_id=zwave.const.COMMAND_CLASS_SENSOR_MULTILEVEL, label=['Temperature'], member='data') - self._unit = self.get_value( + device_unit = self.get_value( class_id=zwave.const.COMMAND_CLASS_SENSOR_MULTILEVEL, label=['Temperature'], member='units') + if device_unit is not None: + self._unit = device_unit # Fan Mode self._current_fan_mode = self.get_value( From 7401ec96b5ca35e8ec4a623f2e04cdd6fc491a31 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 12 Feb 2017 23:31:04 -0800 Subject: [PATCH 08/16] Version bump to 0.38.3 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 44438fa92d4..9deb3b052d5 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 38 -PATCH_VERSION = '2' +PATCH_VERSION = '3' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) From 67d35e6454e939a7691151cda5c805e5c3dc1801 Mon Sep 17 00:00:00 2001 From: Andrey Date: Tue, 14 Feb 2017 21:59:34 +0200 Subject: [PATCH 09/16] Point-fix zwave getter not to ignore label (#5938) --- homeassistant/components/zwave/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index 867a0f96062..69168b23465 100755 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -638,7 +638,6 @@ class ZWaveDeviceEntity(Entity): def _value_handler(self, method=None, class_id=None, index=None, label=None, data=None, member=None, **kwargs): """Get the values for a given command_class with arguments.""" - varname = member if class_id is not None: kwargs[CLASS_ID] = class_id _LOGGER.debug('method=%s, class_id=%s, index=%s, label=%s, data=%s,' @@ -653,16 +652,20 @@ class ZWaveDeviceEntity(Entity): if index is not None and value.index != index: continue if label is not None: + label_found = False for entry in label: - if entry is not None and value.label != entry: - continue + if value.label == entry: + label_found = True + break + if not label_found: + continue if method == 'set': value.data = data return if data is not None and value.data != data: continue if member is not None: - results = getattr(value, varname) + results = getattr(value, member) else: results = value break From ea26aa2c8192e539182f4ad84a93b5e8327c4864 Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Sun, 12 Feb 2017 22:34:13 -0500 Subject: [PATCH 10/16] Fixed typos in wink climate (#5936) --- homeassistant/components/climate/wink.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/climate/wink.py b/homeassistant/components/climate/wink.py index d4785d4a13e..f2c2551d371 100644 --- a/homeassistant/components/climate/wink.py +++ b/homeassistant/components/climate/wink.py @@ -366,8 +366,8 @@ class WinkAC(WinkDevice, ClimateDevice): if target_temp_low is not None: data[ATTR_TARGET_TEMP_LOW] = self._convert_for_display( self.target_temperature_low) - data["total_consumption"] = self.wink.toatl_consumption() - data["schedule_enabled"] = self.wink.toatl_consumption() + data["total_consumption"] = self.wink.total_consumption() + data["schedule_enabled"] = self.wink.schedule_enabled() return data From bbc5c3a3007284e149b995a74ed4ad4e48d39e75 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Mon, 13 Feb 2017 11:23:28 +0100 Subject: [PATCH 12/16] Fix mysensors platforms version requirement (#5942) * Notify and device tracker platforms require mysensors version 2.0 or greater. --- homeassistant/components/device_tracker/mysensors.py | 2 ++ homeassistant/components/notify/mysensors.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/homeassistant/components/device_tracker/mysensors.py b/homeassistant/components/device_tracker/mysensors.py index 2ba19924089..5bbbee89be3 100644 --- a/homeassistant/components/device_tracker/mysensors.py +++ b/homeassistant/components/device_tracker/mysensors.py @@ -55,6 +55,8 @@ def setup_scanner(hass, config, see, discovery_info=None): gateways = hass.data.get(mysensors.MYSENSORS_GATEWAYS) for gateway in gateways: + if float(gateway.protocol_version) < 2.0: + continue gateway.platform_callbacks.append(mysensors_callback) return True diff --git a/homeassistant/components/notify/mysensors.py b/homeassistant/components/notify/mysensors.py index ad747a7ae93..a2708a51efd 100644 --- a/homeassistant/components/notify/mysensors.py +++ b/homeassistant/components/notify/mysensors.py @@ -19,6 +19,8 @@ def get_service(hass, config, discovery_info=None): return for gateway in gateways: + if float(gateway.protocol_version) < 2.0: + continue pres = gateway.const.Presentation set_req = gateway.const.SetReq map_sv_types = { From 91d2ba609eccfffad540ae539f5895f776f9318d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Feb 2017 23:04:25 +0100 Subject: [PATCH 13/16] Remove unit of measurement --- homeassistant/components/sensor/moon.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/homeassistant/components/sensor/moon.py b/homeassistant/components/sensor/moon.py index 3b13e625bb4..2de5b613065 100644 --- a/homeassistant/components/sensor/moon.py +++ b/homeassistant/components/sensor/moon.py @@ -62,11 +62,6 @@ class MoonSensor(Entity): else: return 'New moon' - @property - def unit_of_measurement(self): - """Return the unit the value is expressed in.""" - return 'Phase' - @property def icon(self): """Icon to use in the frontend, if any.""" From 9bcc692ff2b1524746fff1305603c9bccf36d3a3 Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Mon, 13 Feb 2017 21:08:37 -0500 Subject: [PATCH 14/16] Fix #5979 (#5980) --- homeassistant/components/wink.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/wink.py b/homeassistant/components/wink.py index 569def22401..0ef03f54083 100644 --- a/homeassistant/components/wink.py +++ b/homeassistant/components/wink.py @@ -15,7 +15,7 @@ from homeassistant.const import ( from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['python-wink==1.1.1', 'pubnubsub-handler==1.0.0'] +REQUIREMENTS = ['python-wink==1.1.1', 'pubnubsub-handler==1.0.1'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 527e9a17f54..e6103ee4bf5 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -388,7 +388,7 @@ proliphix==0.4.1 psutil==5.1.2 # homeassistant.components.wink -pubnubsub-handler==1.0.0 +pubnubsub-handler==1.0.1 # homeassistant.components.notify.pushbullet pushbullet.py==0.10.0 From b1eb3243bd8e8ff86f8a84e6bded88cf9080dcca Mon Sep 17 00:00:00 2001 From: happyleavesaoc Date: Tue, 14 Feb 2017 04:30:16 -0500 Subject: [PATCH 15/16] timeMin fix (#5983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional extended description… --- homeassistant/components/calendar/google.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/calendar/google.py b/homeassistant/components/calendar/google.py index 022d39b602b..8f9de90a1b1 100644 --- a/homeassistant/components/calendar/google.py +++ b/homeassistant/components/calendar/google.py @@ -66,7 +66,7 @@ class GoogleCalendarData(object): """Get the latest data.""" service = self.calendar_service.get() params = dict(DEFAULT_GOOGLE_SEARCH_PARAMS) - params['timeMin'] = dt.start_of_local_day().isoformat('T') + params['timeMin'] = dt.now().isoformat('T') params['calendarId'] = self.calendar_id if self.search: params['q'] = self.search From d6f525a23ffaa1354a407af25c339c105484f643 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 14 Feb 2017 20:59:54 +0100 Subject: [PATCH 16/16] Bugfix sonos favorite_source after lost connection (#5996) --- homeassistant/components/media_player/sonos.py | 1 - 1 file changed, 1 deletion(-) diff --git a/homeassistant/components/media_player/sonos.py b/homeassistant/components/media_player/sonos.py index e052cfcaea3..d6f723dcfac 100644 --- a/homeassistant/components/media_player/sonos.py +++ b/homeassistant/components/media_player/sonos.py @@ -365,7 +365,6 @@ class SonosDevice(MediaPlayerDevice): self._support_pause = False self._is_playing_tv = False self._is_playing_line_in = False - self._favorite_sources = None self._source_name = None self._last_avtransport_event = None return