From 19b08a975abbaaecc26f734faed0dd51cbcb6d74 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Sun, 20 Nov 2016 20:49:54 +0100 Subject: [PATCH 01/17] ZWave lights: Not use super() (#4476) * Not use super * Review changes --- homeassistant/components/light/zwave.py | 2 +- homeassistant/components/zwave/__init__.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/light/zwave.py b/homeassistant/components/light/zwave.py index d4e94b00e66..e1049192f51 100644 --- a/homeassistant/components/light/zwave.py +++ b/homeassistant/components/light/zwave.py @@ -52,7 +52,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): node = zwave.NETWORK.nodes[discovery_info[zwave.const.ATTR_NODE_ID]] value = node.values[discovery_info[zwave.const.ATTR_VALUE_ID]] customize = hass.data['zwave_customize'] - name = super().entity_id + name = '{}.{}'.format(DOMAIN, zwave.object_id(value)) node_config = customize.get(name, {}) refresh = node_config.get(zwave.CONF_REFRESH_VALUE) delay = node_config.get(zwave.CONF_REFRESH_DELAY) diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index a6294f560be..471b45feed0 100755 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -193,19 +193,19 @@ def _node_object_id(node): return node_object_id -def _object_id(value): +def object_id(value): """Return the object_id of the device value. The object_id contains node_id and value instance id to not collide with other entity_ids. """ - object_id = "{}_{}_{}".format(slugify(_value_name(value)), - value.node.node_id, value.index) + _object_id = "{}_{}_{}".format(slugify(_value_name(value)), + value.node.node_id, value.index) # Add the instance id if there is more than one instance for the value if value.instance > 1: return '{}_{}'.format(object_id, value.instance) - return object_id + return _object_id def nice_print_node(node): @@ -341,7 +341,7 @@ def setup(hass, config): node.generic, node.specific, value.command_class, value.type, value.genre) - name = "{}.{}".format(component, _object_id(value)) + name = "{}.{}".format(component, object_id(value)) node_config = customize.get(name, {}) @@ -594,7 +594,7 @@ class ZWaveDeviceEntity: The object_id contains node_id and value instance id to not collide with other entity_ids. """ - return _object_id(self._value) + return object_id(self._value) @property def device_state_attributes(self): From 99f5db8c02277e20c7f39d1405a0e97307ec6cd0 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 20 Nov 2016 12:11:07 -0800 Subject: [PATCH 02/17] Version bump to 0.33.1 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index aa1f3654851..21396e52040 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 33 -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 6869c7401e5149beb3f63122c70ebd7f1aec2347 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 22 Nov 2016 04:32:21 +0100 Subject: [PATCH 03/17] Bugfix device_tracker init tracker scan (#4514) --- homeassistant/components/device_tracker/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index 7390357f4d7..b00a1044ad6 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -530,7 +530,7 @@ def async_setup_scanner_platform(hass: HomeAssistantType, config: ConfigType, else: host_name = scanner.get_device_name(mac) seen.add(mac) - hass.async_add_job(async_see_device(mac=mac, host_name=host_name)) + hass.add_job(async_see_device(mac=mac, host_name=host_name)) async_track_utc_time_change( hass, device_tracker_scan, second=range(0, 60, interval)) From 755f5b61b7ece1827b76598402927c24edea7c4b Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 22 Nov 2016 04:33:08 +0100 Subject: [PATCH 04/17] Bugfix discovery use wrong time async (#4515) * Bugfix discovery use wrong time async * fix lint --- homeassistant/helpers/discovery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/discovery.py b/homeassistant/helpers/discovery.py index 811b2aeeaf8..051d07b2435 100644 --- a/homeassistant/helpers/discovery.py +++ b/homeassistant/helpers/discovery.py @@ -48,7 +48,7 @@ def async_listen(hass, service, callback): def discover(hass, service, discovered=None, component=None, hass_config=None): """Fire discovery event. Can ensure a component is loaded.""" - hass.async_add_job( + hass.add_job( async_discover(hass, service, discovered, component, hass_config)) @@ -127,7 +127,7 @@ def load_platform(hass, component, platform, discovered=None, Use `listen_platform` to register a callback for these events. """ - hass.async_add_job( + hass.add_job( async_load_platform(hass, component, platform, discovered, hass_config)) From 0647bb7f6b9c19f247da2a6c8476d0816b9365bf Mon Sep 17 00:00:00 2001 From: hexa- Date: Tue, 22 Nov 2016 04:34:48 +0100 Subject: [PATCH 05/17] switch.tplink: expect daily stats to be empty (#4504) Signed-off-by: Martin Weinelt --- homeassistant/components/switch/tplink.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/switch/tplink.py b/homeassistant/components/switch/tplink.py index 0707ee3756b..bcc1b329fa8 100644 --- a/homeassistant/components/switch/tplink.py +++ b/homeassistant/components/switch/tplink.py @@ -97,8 +97,12 @@ class SmartPlugSwitch(SwitchDevice): = "%.1f A" % emeter_readings["current"] emeter_statics = self.smartplug.get_emeter_daily() - self._emeter_params[ATTR_DAILY_CONSUMPTION] \ - = "%.2f kW" % emeter_statics[int(time.strftime("%e"))] + try: + self._emeter_params[ATTR_DAILY_CONSUMPTION] \ + = "%.2f kW" % emeter_statics[int(time.strftime("%e"))] + except KeyError: + # device returned no daily history + pass except OSError: _LOGGER.warning('Could not update status for %s', self.name) From e5aa40fa5d37dd2f6fe5ffc8723a8ae1e5c8890f Mon Sep 17 00:00:00 2001 From: Jack Chapple Date: Tue, 22 Nov 2016 03:35:36 +0000 Subject: [PATCH 06/17] Fixes #4500 (#4502) --- homeassistant/components/light/zwave.py | 2 +- homeassistant/components/zwave/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/light/zwave.py b/homeassistant/components/light/zwave.py index e1049192f51..de471db4957 100644 --- a/homeassistant/components/light/zwave.py +++ b/homeassistant/components/light/zwave.py @@ -201,7 +201,7 @@ class ZwaveColorLight(ZwaveDimmer): self._rgb = None self._ct = None - super().__init__(value) + super().__init__(value, refresh, delay) # Create a listener so the color values can be linked to this entity dispatcher.connect( diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index 471b45feed0..7c4d5e02879 100755 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -204,7 +204,7 @@ def object_id(value): # Add the instance id if there is more than one instance for the value if value.instance > 1: - return '{}_{}'.format(object_id, value.instance) + return '{}_{}'.format(_object_id, value.instance) return _object_id From c23809488b16f4f8767da8b5d7c70833a5ff6b6a Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Tue, 22 Nov 2016 04:36:44 +0100 Subject: [PATCH 07/17] Neato Fixes (#4490) * Fix, switch state. Move constants to hub * Responsiveness * Whitespace * Delay was not needed as commands does not return until done. --- homeassistant/components/neato.py | 47 +++++++++++++++++++++++ homeassistant/components/sensor/neato.py | 49 +----------------------- homeassistant/components/switch/neato.py | 8 ++-- 3 files changed, 54 insertions(+), 50 deletions(-) diff --git a/homeassistant/components/neato.py b/homeassistant/components/neato.py index 0c77c3a6b5c..e0b36721f74 100644 --- a/homeassistant/components/neato.py +++ b/homeassistant/components/neato.py @@ -31,6 +31,53 @@ CONFIG_SCHEMA = vol.Schema({ }) }, extra=vol.ALLOW_EXTRA) +STATES = { + 1: 'Idle', + 2: 'Busy', + 3: 'Pause', + 4: 'Error' +} + +MODE = { + 1: 'Eco', + 2: 'Turbo' +} + +ACTION = { + 0: 'No action', + 1: 'House cleaning', + 2: 'Spot cleaning', + 3: 'Manual cleaning', + 4: 'Docking', + 5: 'User menu active', + 6: 'Cleaning cancelled', + 7: 'Updating...', + 8: 'Copying logs...', + 9: 'Calculating position...', + 10: 'IEC test' +} + +ERRORS = { + 'ui_error_brush_stuck': 'Brush stuck', + 'ui_error_brush_overloaded': 'Brush overloaded', + 'ui_error_bumper_stuck': 'Bumper stuck', + 'ui_error_dust_bin_missing': 'Dust bin missing', + 'ui_error_dust_bin_full': 'Dust bin full', + 'ui_error_dust_bin_emptied': 'Dust bin emptied', + 'ui_error_navigation_backdrop_leftbump': 'Clear my path', + 'ui_error_navigation_noprogress': 'Clear my path', + 'ui_error_navigation_origin_unclean': 'Clear my path', + 'ui_error_navigation_pathproblems_returninghome': 'Cannot return to base', + 'ui_error_navigation_falling': 'Clear my path', + 'ui_error_picked_up': 'Picked up', + 'ui_error_stuck': 'Stuck!' +} + +ALERTS = { + 'ui_alert_dust_bin_full': 'Please empty dust bin', + 'ui_alert_recovering_location': 'Returning to start' +} + def setup(hass, config): """Setup the Verisure component.""" diff --git a/homeassistant/components/sensor/neato.py b/homeassistant/components/sensor/neato.py index bbc0570740c..438e5fb189b 100644 --- a/homeassistant/components/sensor/neato.py +++ b/homeassistant/components/sensor/neato.py @@ -7,7 +7,8 @@ https://home-assistant.io/components/sensor.neato/ import logging from homeassistant.helpers.entity import Entity -from homeassistant.components.neato import NEATO_ROBOTS, NEATO_LOGIN +from homeassistant.components.neato import ( + NEATO_ROBOTS, NEATO_LOGIN, ACTION, ERRORS, MODE, ALERTS) _LOGGER = logging.getLogger(__name__) SENSOR_TYPE_STATUS = 'status' @@ -18,52 +19,6 @@ SENSOR_TYPES = { SENSOR_TYPE_BATTERY: ['Battery'] } -STATES = { - 1: 'Idle', - 2: 'Busy', - 3: 'Pause', - 4: 'Error' -} - -MODE = { - 1: 'Eco', - 2: 'Turbo' -} - -ACTION = { - 0: 'No action', - 1: 'House cleaning', - 2: 'Spot cleaning', - 3: 'Manual cleaning', - 4: 'Docking', - 5: 'User menu active', - 6: 'Cleaning cancelled', - 7: 'Updating...', - 8: 'Copying logs...', - 9: 'Calculating position...', - 10: 'IEC test' -} - -ERRORS = { - 'ui_error_brush_stuck': 'Brush stuck', - 'ui_error_brush_overloaded': 'Brush overloaded', - 'ui_error_bumper_stuck': 'Bumper stuck', - 'ui_error_dust_bin_missing': 'Dust bin missing', - 'ui_error_dust_bin_full': 'Dust bin full', - 'ui_error_dust_bin_emptied': 'Dust bin emptied', - 'ui_error_navigation_noprogress': 'Clear my path', - 'ui_error_navigation_origin_unclean': 'Clear my path', - 'ui_error_navigation_falling': 'Clear my path', - 'ui_error_picked_up': 'Picked up', - 'ui_error_stuck': 'Stuck!' - -} - -ALERTS = { - 'ui_alert_dust_bin_full': 'Please empty dust bin', - 'ui_alert_recovering_location': 'Returning to start' -} - def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the Neato sensor platform.""" diff --git a/homeassistant/components/switch/neato.py b/homeassistant/components/switch/neato.py index fdc5f9352b7..3b723acb748 100644 --- a/homeassistant/components/switch/neato.py +++ b/homeassistant/components/switch/neato.py @@ -4,7 +4,6 @@ Support for Neato Connected Vaccums switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.neato/ """ -import time import logging from homeassistant.const import STATE_OFF, STATE_ON @@ -57,17 +56,21 @@ class NeatoConnectedSwitch(ToggleEntity): self._state = self.robot.state _LOGGER.debug('self._state=%s', self._state) if self.type == SWITCH_TYPE_CLEAN: - if (self.robot.state['action'] == 1 and + if (self.robot.state['action'] == 1 or + self.robot.state['action'] == 2 or + self.robot.state['action'] == 3 and self.robot.state['state'] == 2): self._clean_state = STATE_ON else: self._clean_state = STATE_OFF + _LOGGER.debug('schedule_state=%s', self._schedule_state) if self.type == SWITCH_TYPE_SCHEDULE: _LOGGER.debug('self._state=%s', self._state) if self.robot.schedule_enabled: self._schedule_state = STATE_ON else: self._schedule_state = STATE_OFF + _LOGGER.debug('schedule_state=%s', self._schedule_state) @property def name(self): @@ -105,7 +108,6 @@ class NeatoConnectedSwitch(ToggleEntity): """Turn the switch off.""" if self.type == SWITCH_TYPE_CLEAN: self.robot.pause_cleaning() - time.sleep(1) self.robot.send_to_base() elif self.type == SWITCH_TYPE_SCHEDULE: self.robot.disable_schedule() From 8e4dbcaf21b448d8b72d939b08dc247ed63c41c9 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 21 Nov 2016 20:39:23 -0700 Subject: [PATCH 08/17] Fixing 'Unknown' status for Nest Protect devices (#4475) * Fixing 'Unknown' status for Nest Protect devices * Fixing bad formatting --- homeassistant/components/sensor/nest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/nest.py b/homeassistant/components/sensor/nest.py index ccf8be84adc..9f8e7396f93 100644 --- a/homeassistant/components/sensor/nest.py +++ b/homeassistant/components/sensor/nest.py @@ -195,6 +195,7 @@ class NestProtectSensor(NestSensor): if self.variable == 'battery_level': self._state = getattr(self.device, self.variable) else: + self._state = 'Unknown' if state == 0: self._state = 'Ok' if state == 1 or state == 2: @@ -202,8 +203,6 @@ class NestProtectSensor(NestSensor): if state == 3: self._state = 'Emergency' - self._state = 'Unknown' - @property def name(self): """Return the name of the nest, if any.""" From 9a065cc53658c378c7f97324bf23658a4ff04c69 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 21 Nov 2016 19:40:19 -0800 Subject: [PATCH 09/17] Version bump to 0.33.2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 21396e52040..cfbb30927f5 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 33 -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 40b58242307b58bc91d8c5a57237b4d85d0978ce Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 21 Nov 2016 20:16:34 -0800 Subject: [PATCH 10/17] Skip google calendar offset test (#4520) --- tests/components/calendar/test_google.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/components/calendar/test_google.py b/tests/components/calendar/test_google.py index 534faccd737..d19ecb65704 100644 --- a/tests/components/calendar/test_google.py +++ b/tests/components/calendar/test_google.py @@ -4,6 +4,8 @@ import logging import unittest from unittest.mock import patch +import pytest + import homeassistant.components.calendar as calendar_base import homeassistant.components.calendar.google as calendar import homeassistant.util.dt as dt_util @@ -286,6 +288,7 @@ class TestComponentsGoogleCalendar(unittest.TestCase): 'description': '' }) + @pytest.mark.skip @patch('homeassistant.components.calendar.google.GoogleCalendarData') def test_all_day_offset_in_progress_event(self, mock_next_event): """Test that we can create an event trigger on device.""" From 8f35212dd620b4f1bc462c66273452e259ff5d60 Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Wed, 23 Nov 2016 05:28:31 +0200 Subject: [PATCH 11/17] Yr.no update entities every hour (#4521) --- homeassistant/components/sensor/yr.py | 60 ++++++++++++++------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/homeassistant/components/sensor/yr.py b/homeassistant/components/sensor/yr.py index 3436288b627..6429c9dcaad 100644 --- a/homeassistant/components/sensor/yr.py +++ b/homeassistant/components/sensor/yr.py @@ -19,7 +19,8 @@ from homeassistant.const import ( CONF_LATITUDE, CONF_LONGITUDE, CONF_ELEVATION, CONF_MONITORED_CONDITIONS, ATTR_ATTRIBUTION) from homeassistant.helpers.entity import Entity -from homeassistant.helpers.event import async_track_point_in_utc_time +from homeassistant.helpers.event import ( + async_track_point_in_utc_time, async_track_utc_time_change) from homeassistant.util import dt as dt_util @@ -76,6 +77,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): yield from async_add_devices(dev) weather = YrData(hass, coordinates, dev) + # Update weather on the hour + async_track_utc_time_change(hass, weather.async_update, minute=0, second=0) yield from weather.async_update() @@ -139,40 +142,41 @@ class YrData(object): self.hass = hass @asyncio.coroutine - def async_update(self): + def async_update(self, *_): """Get the latest data from yr.no.""" def try_again(err: str): - """Schedule again later.""" + """Retry in 15 minutes.""" _LOGGER.warning('Retrying in 15 minutes: %s', err) + self._nextrun = None nxt = dt_util.utcnow() + timedelta(minutes=15) - async_track_point_in_utc_time(self.hass, self.async_update, nxt) + if nxt.minute >= 15: + async_track_point_in_utc_time(self.hass, self.async_update, + nxt) - try: - with async_timeout.timeout(10, loop=self.hass.loop): - resp = yield from self.hass.websession.get(self._url) - if resp.status != 200: - try_again('{} returned {}'.format(self._url, resp.status)) + if self._nextrun is None or dt_util.utcnow() >= self._nextrun: + try: + with async_timeout.timeout(10, loop=self.hass.loop): + resp = yield from self.hass.websession.get(self._url) + if resp.status != 200: + try_again('{} returned {}'.format(self._url, resp.status)) + return + text = yield from resp.text() + self.hass.async_add_job(resp.release()) + except (asyncio.TimeoutError, aiohttp.errors.ClientError, + aiohttp.errors.ClientDisconnectedError) as err: + try_again(err) return - text = yield from resp.text() - self.hass.async_add_job(resp.release()) - except (asyncio.TimeoutError, aiohttp.errors.ClientError, - aiohttp.errors.ClientDisconnectedError) as err: - try_again(err) - return - try: - import xmltodict - self.data = xmltodict.parse(text)['weatherdata'] - model = self.data['meta']['model'] - if '@nextrun' not in model: - model = model[0] - next_run = dt_util.parse_datetime(model['@nextrun']) - except (ExpatError, IndexError) as err: - try_again(err) - return - - # Schedule next execution - async_track_point_in_utc_time(self.hass, self.async_update, next_run) + try: + import xmltodict + self.data = xmltodict.parse(text)['weatherdata'] + model = self.data['meta']['model'] + if '@nextrun' not in model: + model = model[0] + self._nextrun = dt_util.parse_datetime(model['@nextrun']) + except (ExpatError, IndexError) as err: + try_again(err) + return now = dt_util.utcnow() From 356ad6e4680fc3c20c6712b503add5a6cf4e666d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 22 Nov 2016 18:36:10 -0800 Subject: [PATCH 12/17] Bump netdisco (#4539) --- homeassistant/components/discovery.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/discovery.py b/homeassistant/components/discovery.py index 780f2ab75d5..142764ea522 100644 --- a/homeassistant/components/discovery.py +++ b/homeassistant/components/discovery.py @@ -14,7 +14,7 @@ import voluptuous as vol from homeassistant.const import EVENT_HOMEASSISTANT_START from homeassistant.helpers.discovery import load_platform, discover -REQUIREMENTS = ['netdisco==0.7.6'] +REQUIREMENTS = ['netdisco==0.7.7'] DOMAIN = 'discovery' diff --git a/requirements_all.txt b/requirements_all.txt index f8a5d4dac24..ea450169ec8 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -278,7 +278,7 @@ mficlient==0.3.0 miflora==0.1.12 # homeassistant.components.discovery -netdisco==0.7.6 +netdisco==0.7.7 # homeassistant.components.sensor.neurio_energy neurio==0.2.10 From e93b079ef4f5547d6b6177388ebdbf35019bc1b6 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 22 Nov 2016 08:21:08 -0800 Subject: [PATCH 13/17] Fix platform discovery when platform discovered during discovery of a (#4529) component --- homeassistant/helpers/discovery.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/homeassistant/helpers/discovery.py b/homeassistant/helpers/discovery.py index 051d07b2435..de16a0b907d 100644 --- a/homeassistant/helpers/discovery.py +++ b/homeassistant/helpers/discovery.py @@ -151,11 +151,10 @@ def async_load_platform(hass, component, platform, discovered=None, This method is a coroutine. """ did_lock = False - if component not in hass.config.components: - setup_lock = hass.data.get('setup_lock') - if setup_lock and setup_lock.locked(): - did_lock = True - yield from setup_lock.acquire() + setup_lock = hass.data.get('setup_lock') + if setup_lock and setup_lock.locked(): + did_lock = True + yield from setup_lock.acquire() setup_success = True From d18f2684fbf682dfd4eb046e7830ffd317b41907 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 22 Nov 2016 19:39:15 -0800 Subject: [PATCH 14/17] Version bump to 0.33.3 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index cfbb30927f5..c845a561d0a 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 33 -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 8c56091af7d2fc23cf2a44c85ee210d31de56120 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 23 Nov 2016 18:52:03 +0100 Subject: [PATCH 15/17] Hotfix executor pool size (#4552) --- homeassistant/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/core.py b/homeassistant/core.py index f7847228338..50c805e2548 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -109,7 +109,7 @@ class HomeAssistant(object): else: self.loop = loop or asyncio.get_event_loop() - self.executor = ThreadPoolExecutor(max_workers=5) + self.executor = ThreadPoolExecutor(max_workers=EXECUTOR_POOL_SIZE) self.loop.set_default_executor(self.executor) self.loop.set_exception_handler(self._async_exception_handler) self._pending_tasks = [] From 58eb0ec52ad8c827d7fc94a827e3fa951eead852 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 24 Nov 2016 14:56:33 -0800 Subject: [PATCH 16/17] Set executor pool size to 10 (#4571) --- homeassistant/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/core.py b/homeassistant/core.py index 50c805e2548..8361c031eec 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -56,7 +56,7 @@ SERVICE_CALL_LIMIT = 10 # seconds ENTITY_ID_PATTERN = re.compile(r"^(\w+)\.(\w+)$") # Size of a executor pool -EXECUTOR_POOL_SIZE = 15 +EXECUTOR_POOL_SIZE = 10 # Time for cleanup internal pending tasks TIME_INTERVAL_TASKS_CLEANUP = 10 From 44b6d23e0f075d42eaf5edf1fb85acddeba9ef0a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 24 Nov 2016 14:57:12 -0800 Subject: [PATCH 17/17] Version bump to 0.33.4 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index c845a561d0a..c606bf5d94d 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 33 -PATCH_VERSION = '3' +PATCH_VERSION = '4' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2)