From 6541e789fb329a19b58f3001dad11f849934159b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 5 Oct 2017 09:18:01 -0700 Subject: [PATCH 01/13] Version bump to 0.55 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 01a28493e5e..33c91eeb067 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 55 -PATCH_VERSION = '0.dev0' +PATCH_VERSION = '0' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) From 1ab942e0a2a1ede1a8c3c44268fb6d00ecc1c83b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 5 Oct 2017 21:47:51 -0700 Subject: [PATCH 02/13] Deprecate Python 3.4 support (#9684) * Deprecate Python 3.4 support * Update text --- homeassistant/bootstrap.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 3ff4d99fb98..b62b86b30d2 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -83,6 +83,18 @@ def async_from_config_dict(config: Dict[str, Any], This method is a coroutine. """ start = time() + + if enable_log: + async_enable_logging(hass, verbose, log_rotate_days, log_file) + + if sys.version_info[:2] < (3, 5): + _LOGGER.warning( + 'Python 3.4 support has been deprecated and will be removed in ' + 'the begining of 2018. Please upgrade Python or your operating ' + 'system. More info: https://home-assistant.io/blog/2017/10/06/' + 'deprecating-python-3.4-support/' + ) + core_config = config.get(core.DOMAIN, {}) try: @@ -93,9 +105,6 @@ def async_from_config_dict(config: Dict[str, Any], yield from hass.async_add_job(conf_util.process_ha_config_upgrade, hass) - if enable_log: - async_enable_logging(hass, verbose, log_rotate_days, log_file) - hass.config.skip_pip = skip_pip if skip_pip: _LOGGER.warning("Skipping pip installation of required modules. " From 770f8bd1c39ac78b0c91e3a665586e7075319a3b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 5 Oct 2017 21:12:49 -0700 Subject: [PATCH 03/13] Fix coap commit (#9712) --- virtualization/Docker/scripts/aiocoap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualization/Docker/scripts/aiocoap b/virtualization/Docker/scripts/aiocoap index 8e36c616cb4..275b641806d 100755 --- a/virtualization/Docker/scripts/aiocoap +++ b/virtualization/Docker/scripts/aiocoap @@ -19,5 +19,5 @@ python3 setup.py install cd ../.. git clone --depth 1 https://github.com/chrysn/aiocoap/ cd aiocoap -git reset --hard 0df6a1e44582de99ae944b6a7536d08e2a612e8f +git reset --hard 3286f48f0b949901c8b5c04c0719dc54ab63d431 python3 -m pip install . From de4f610540f3f149ff9d942ba5aab7c0bb425d42 Mon Sep 17 00:00:00 2001 From: Lewis Juggins Date: Sat, 7 Oct 2017 16:54:51 +0100 Subject: [PATCH 04/13] [light.tradfri] Clone all of aiocoap to ensure pinned commit will be present (#9713) --- virtualization/Docker/scripts/aiocoap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualization/Docker/scripts/aiocoap b/virtualization/Docker/scripts/aiocoap index 275b641806d..e234aa31236 100755 --- a/virtualization/Docker/scripts/aiocoap +++ b/virtualization/Docker/scripts/aiocoap @@ -17,7 +17,7 @@ cd cython python3 setup.py install cd ../.. -git clone --depth 1 https://github.com/chrysn/aiocoap/ +git clone https://github.com/chrysn/aiocoap cd aiocoap git reset --hard 3286f48f0b949901c8b5c04c0719dc54ab63d431 python3 -m pip install . From 7ed21d90aac75551c8aa1e43dded621e12ae72ab Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 15 Oct 2017 11:51:21 -0700 Subject: [PATCH 05/13] Version bump to 0.55.1 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 33c91eeb067..30b81385877 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 55 -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 45620d68922b856b0f24eab11c5e8346a59e76ee Mon Sep 17 00:00:00 2001 From: Joe Lu Date: Sun, 8 Oct 2017 03:31:00 -0700 Subject: [PATCH 06/13] Fix for TypeError in synology camera (#9754) --- homeassistant/components/camera/synology.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/camera/synology.py b/homeassistant/components/camera/synology.py index be01a7fc90d..0b97f55397c 100644 --- a/homeassistant/components/camera/synology.py +++ b/homeassistant/components/camera/synology.py @@ -20,7 +20,7 @@ from homeassistant.helpers.aiohttp_client import ( async_aiohttp_proxy_web) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['py-synology==0.1.1'] +REQUIREMENTS = ['py-synology==0.1.3'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index a04a4240ae4..4838cb12ded 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -540,7 +540,7 @@ pwmled==1.2.1 py-cpuinfo==3.3.0 # homeassistant.components.camera.synology -py-synology==0.1.1 +py-synology==0.1.3 # homeassistant.components.hdmi_cec pyCEC==0.4.13 From 9b43388093479c6aab4ea191322a7414a7857f4b Mon Sep 17 00:00:00 2001 From: pascal Date: Mon, 9 Oct 2017 16:57:44 +0200 Subject: [PATCH 07/13] missing is_closed ( rflink cover fix ) (#9776) * Added is_closed * whitespaces -- * removed whitespace --- homeassistant/components/cover/rflink.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/cover/rflink.py b/homeassistant/components/cover/rflink.py index 45a0b27aa07..a9b7598159f 100644 --- a/homeassistant/components/cover/rflink.py +++ b/homeassistant/components/cover/rflink.py @@ -103,6 +103,11 @@ class RflinkCover(RflinkCommand, CoverDevice): """No polling available in RFlink cover.""" return False + @property + def is_closed(self): + """Return if the cover is closed.""" + return None + def async_close_cover(self, **kwargs): """Turn the device close.""" return self._async_handle_command("close_cover") From 431201cb9ba173708403ece5d45e0aaeb5c3c2d4 Mon Sep 17 00:00:00 2001 From: Lewis Juggins Date: Tue, 10 Oct 2017 08:35:28 +0100 Subject: [PATCH 08/13] [light.tradfri] Fix transition time (#9785) * Fix transition time, set a default * Wrong default * Use int for safety * Revert default. --- homeassistant/components/light/tradfri.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/light/tradfri.py b/homeassistant/components/light/tradfri.py index 3efab8309fc..f4feb4b7adf 100644 --- a/homeassistant/components/light/tradfri.py +++ b/homeassistant/components/light/tradfri.py @@ -105,7 +105,7 @@ class TradfriGroup(Light): """Instruct the group lights to turn on, or dim.""" keys = {} if ATTR_TRANSITION in kwargs: - keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) + keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10 if ATTR_BRIGHTNESS in kwargs: self.hass.async_add_job(self._api( @@ -259,7 +259,7 @@ class TradfriLight(Light): keys = {} if ATTR_TRANSITION in kwargs: - keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) + keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10 if ATTR_BRIGHTNESS in kwargs: self.hass.async_add_job(self._api( From 586e54f8bf3bcf58476dba619fa6cecf65d94d1b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 10 Oct 2017 01:39:25 -0700 Subject: [PATCH 09/13] OwnTracks: Fix handler is None checking (#9794) * OwnTracks: Fix handler is None checking * Update owntracks.py --- homeassistant/components/device_tracker/owntracks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/device_tracker/owntracks.py b/homeassistant/components/device_tracker/owntracks.py index 07dc9f1ab5c..f301b2f454e 100644 --- a/homeassistant/components/device_tracker/owntracks.py +++ b/homeassistant/components/device_tracker/owntracks.py @@ -407,7 +407,8 @@ def async_handle_message(hass, context, message): handler = HANDLERS.get(msgtype) if handler is None: - error = 'Received unsupported message type: {}.'.format(msgtype) - _LOGGER.warning(error) + _LOGGER.warning( + 'Received unsupported message type: %s.', msgtype) + return yield from handler(hass, context, message) From fdb698bef071e87a6ef6cac4bcd8290ed022cfde Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Fri, 13 Oct 2017 06:05:33 +0100 Subject: [PATCH 10/13] Changed yaml.load into yaml.safe_load (#9841) --- homeassistant/components/google.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/google.py b/homeassistant/components/google.py index 889c905613f..efb2b12bfca 100644 --- a/homeassistant/components/google.py +++ b/homeassistant/components/google.py @@ -269,7 +269,7 @@ def load_config(path): calendars = {} try: with open(path) as file: - data = yaml.load(file) + data = yaml.safe_load(file) for calendar in data: try: calendars.update({calendar[CONF_CAL_ID]: From 2547a235c18548adcc8b281180cc01ef3b92b591 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Fri, 13 Oct 2017 06:01:29 +0100 Subject: [PATCH 11/13] Bugfix/9811 jinja autoescape (#9842) * Added autoescape kwarg to Jinja environment * Removed extra comma --- homeassistant/components/frontend/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 112c93403b0..1820dcdc3f6 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -329,6 +329,7 @@ class IndexView(HomeAssistantView): from jinja2 import FileSystemLoader, Environment self.templates = Environment( + autoescape=True, loader=FileSystemLoader( os.path.join(os.path.dirname(__file__), 'templates/') ) From ff6f5cc1166a6fecb791e259c27f7771d6eb2697 Mon Sep 17 00:00:00 2001 From: Philipp Schmitt Date: Sun, 15 Oct 2017 21:16:23 +0200 Subject: [PATCH 12/13] Fix #9839 (#9880) * Fix #9839 * Update requirements * Default state: STATE_UNKNOWN -> None * Default the state to None in the constructor as well --- homeassistant/components/media_player/liveboxplaytv.py | 8 ++++---- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/media_player/liveboxplaytv.py b/homeassistant/components/media_player/liveboxplaytv.py index 43678d90829..594e9b20432 100644 --- a/homeassistant/components/media_player/liveboxplaytv.py +++ b/homeassistant/components/media_player/liveboxplaytv.py @@ -18,10 +18,10 @@ from homeassistant.components.media_player import ( MEDIA_TYPE_CHANNEL, MediaPlayerDevice, PLATFORM_SCHEMA) from homeassistant.const import ( CONF_HOST, CONF_PORT, STATE_ON, STATE_OFF, STATE_PLAYING, - STATE_PAUSED, STATE_UNKNOWN, CONF_NAME) + STATE_PAUSED, CONF_NAME) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['liveboxplaytv==1.4.9'] +REQUIREMENTS = ['liveboxplaytv==1.5.0'] _LOGGER = logging.getLogger(__name__) @@ -72,7 +72,7 @@ class LiveboxPlayTvDevice(MediaPlayerDevice): self._muted = False self._name = name self._current_source = None - self._state = STATE_UNKNOWN + self._state = None self._channel_list = {} self._current_channel = None self._current_program = None @@ -92,7 +92,7 @@ class LiveboxPlayTvDevice(MediaPlayerDevice): self._client.get_current_channel_image(img_size=300) self.refresh_channel_list() except requests.ConnectionError: - self._state = STATE_OFF + self._state = None @property def name(self): diff --git a/requirements_all.txt b/requirements_all.txt index 4838cb12ded..6bbc87aed06 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -398,7 +398,7 @@ lightify==1.0.6 limitlessled==1.0.8 # homeassistant.components.media_player.liveboxplaytv -liveboxplaytv==1.4.9 +liveboxplaytv==1.5.0 # homeassistant.components.lametric # homeassistant.components.notify.lametric From 1f25aa74ddd2aff158d2f08cd6babafdb5ab276a Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 16 Oct 2017 21:01:25 +0200 Subject: [PATCH 13/13] Release 0.55.2 (#9904) * Do not auto-install credstash (#9844) * Pump release to 0.55.2 --- homeassistant/const.py | 2 +- homeassistant/scripts/credstash.py | 1 + homeassistant/util/yaml.py | 2 +- requirements_all.txt | 2 +- script/gen_requirements_all.py | 3 ++- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 30b81385877..95a3c63bb8f 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 55 -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) diff --git a/homeassistant/scripts/credstash.py b/homeassistant/scripts/credstash.py index f17105d83de..4c9273b8299 100644 --- a/homeassistant/scripts/credstash.py +++ b/homeassistant/scripts/credstash.py @@ -24,6 +24,7 @@ def run(args): 'value', help="The value to save when putting a secret", nargs='?', default=None) + # pylint: disable=import-error import credstash import botocore diff --git a/homeassistant/util/yaml.py b/homeassistant/util/yaml.py index c484fe3372a..da97ed5662e 100644 --- a/homeassistant/util/yaml.py +++ b/homeassistant/util/yaml.py @@ -13,7 +13,7 @@ except ImportError: keyring = None try: - import credstash + import credstash # pylint: disable=import-error except ImportError: credstash = None diff --git a/requirements_all.txt b/requirements_all.txt index 6bbc87aed06..d7f53c75dc1 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -156,7 +156,7 @@ colorlog==3.0.1 concord232==0.14 # homeassistant.scripts.credstash -credstash==1.13.3 +# credstash==1.13.3 # homeassistant.components.sensor.crimereports crimereports==1.0.0 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index dd1602fba6f..ba9cecb6684 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -29,7 +29,8 @@ COMMENT_REQUIREMENTS = ( 'blinkt', 'smbus-cffi', 'envirophat', - 'i2csense' + 'i2csense', + 'credstash' ) TEST_REQUIREMENTS = (