From 8c525b3087234ee657ed6252abac58c8d79aff43 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 2 Nov 2017 09:31:30 -0700 Subject: [PATCH 01/20] Version bump to 0.57 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index aef543e3666..1c84c9d57f1 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 57 -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 b77df372d69ede39fe222f1220211f5ea4c85439 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 2 Nov 2017 22:51:53 -0700 Subject: [PATCH 02/20] Update frontend --- 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 bedcd0bd7ae..d354557fa0f 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -21,7 +21,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==20171102.0'] +REQUIREMENTS = ['home-assistant-frontend==20171103.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api'] diff --git a/requirements_all.txt b/requirements_all.txt index 9968ec65fc4..acfcb7d4745 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -330,7 +330,7 @@ hipnotify==1.0.8 holidays==0.8.1 # homeassistant.components.frontend -home-assistant-frontend==20171102.0 +home-assistant-frontend==20171103.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 b1b2624cd66..62aaf4c3b5f 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -74,7 +74,7 @@ hbmqtt==0.8 holidays==0.8.1 # homeassistant.components.frontend -home-assistant-frontend==20171102.0 +home-assistant-frontend==20171103.0 # homeassistant.components.influxdb # homeassistant.components.sensor.influxdb From 0e1a3c0665c6d6c77206b15d7ec63b876556eec2 Mon Sep 17 00:00:00 2001 From: PeteBa Date: Fri, 3 Nov 2017 15:28:16 +0000 Subject: [PATCH 03/20] Maintain recorder purge schedule (#10279) * Maintain automated purge schedule * Updates from review feedback --- homeassistant/components/recorder/__init__.py | 67 ++++++++++++------- tests/components/recorder/test_init.py | 3 +- 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index a285486437e..df19f0125ef 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -14,6 +14,7 @@ from os import path import queue import threading import time +from collections import namedtuple from datetime import datetime, timedelta from typing import Optional, Dict @@ -27,7 +28,6 @@ from homeassistant.const import ( EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MATCH_ALL) import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entityfilter import generate_filter -from homeassistant.helpers.event import async_track_time_interval from homeassistant.helpers.typing import ConfigType import homeassistant.util.dt as dt_util from homeassistant import config as conf_util @@ -121,7 +121,7 @@ def run_information(hass, point_in_time: Optional[datetime]=None): def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the recorder.""" conf = config.get(DOMAIN, {}) - purge_days = conf.get(CONF_PURGE_KEEP_DAYS) + keep_days = conf.get(CONF_PURGE_KEEP_DAYS) purge_interval = conf.get(CONF_PURGE_INTERVAL) db_url = conf.get(CONF_DB_URL, None) @@ -132,28 +132,20 @@ def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: include = conf.get(CONF_INCLUDE, {}) exclude = conf.get(CONF_EXCLUDE, {}) instance = hass.data[DATA_INSTANCE] = Recorder( - hass, uri=db_url, include=include, exclude=exclude) + hass=hass, keep_days=keep_days, purge_interval=purge_interval, + uri=db_url, include=include, exclude=exclude) instance.async_initialize() instance.start() - @asyncio.coroutine - def async_handle_purge_interval(now): - """Handle purge interval.""" - instance.do_purge(purge_days) - @asyncio.coroutine def async_handle_purge_service(service): """Handle calls to the purge service.""" - instance.do_purge(service.data[ATTR_KEEP_DAYS]) + instance.do_adhoc_purge(service.data[ATTR_KEEP_DAYS]) descriptions = yield from hass.async_add_job( conf_util.load_yaml_config_file, path.join( path.dirname(__file__), 'services.yaml')) - if purge_interval and purge_days: - async_track_time_interval(hass, async_handle_purge_interval, - timedelta(days=purge_interval)) - hass.services.async_register(DOMAIN, SERVICE_PURGE, async_handle_purge_service, descriptions.get(SERVICE_PURGE), @@ -162,16 +154,21 @@ def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: return (yield from instance.async_db_ready) +PurgeTask = namedtuple('PurgeTask', ['keep_days']) + + class Recorder(threading.Thread): """A threaded recorder class.""" - def __init__(self, hass: HomeAssistant, uri: str, + def __init__(self, hass: HomeAssistant, keep_days: int, + purge_interval: int, uri: str, include: Dict, exclude: Dict) -> None: """Initialize the recorder.""" threading.Thread.__init__(self, name='Recorder') self.hass = hass - self.purge_days = None + self.keep_days = keep_days + self.purge_interval = purge_interval self.queue = queue.Queue() # type: Any self.recording_start = dt_util.utcnow() self.db_url = uri @@ -186,18 +183,16 @@ class Recorder(threading.Thread): self.exclude_t = exclude.get(CONF_EVENT_TYPES, []) self.get_session = None - self.purge_task = object() @callback def async_initialize(self): """Initialize the recorder.""" self.hass.bus.async_listen(MATCH_ALL, self.event_listener) - def do_purge(self, purge_days=None): - """Event listener for purging data.""" - if purge_days is not None: - self.purge_days = purge_days - self.queue.put(self.purge_task) + def do_adhoc_purge(self, keep_days): + """Trigger an adhoc purge retaining keep_days worth of data.""" + if keep_days is not None: + self.queue.put(PurgeTask(keep_days)) def run(self): """Start processing events to save.""" @@ -264,6 +259,31 @@ class Recorder(threading.Thread): self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, notify_hass_started) + if self.keep_days and self.purge_interval: + async_track_point_in_time = \ + self.hass.helpers.event.async_track_point_in_time + + @callback + def async_purge(now): + """Trigger the purge and schedule the next run.""" + self.queue.put(PurgeTask(self.keep_days)) + async_track_point_in_time(async_purge, now + timedelta( + days=self.purge_interval)) + + earliest = dt_util.utcnow() + timedelta(minutes=30) + run = latest = dt_util.utcnow() + \ + timedelta(days=self.purge_interval) + with session_scope(session=self.get_session()) as session: + event = session.query(Events).first() + if event is not None: + session.expunge(event) + run = dt_util.UTC.localize(event.time_fired) + \ + timedelta(days=self.keep_days+self.purge_interval) + run = min(latest, max(run, earliest)) + + _LOGGER.debug("Scheduling purge run for %s", run) + async_track_point_in_time(async_purge, run) + self.hass.add_job(register) result = hass_started.result() @@ -279,8 +299,9 @@ class Recorder(threading.Thread): self._close_connection() self.queue.task_done() return - elif event is self.purge_task: - purge.purge_old_data(self, self.purge_days) + elif isinstance(event, PurgeTask): + purge.purge_old_data(self, event.keep_days) + self.queue.task_done() continue elif event.event_type == EVENT_TIME_CHANGED: self.queue.task_done() diff --git a/tests/components/recorder/test_init.py b/tests/components/recorder/test_init.py index ed04e96a43c..58b8dc1f839 100644 --- a/tests/components/recorder/test_init.py +++ b/tests/components/recorder/test_init.py @@ -195,7 +195,8 @@ def test_recorder_setup_failure(): with patch.object(Recorder, '_setup_connection') as setup, \ patch('homeassistant.components.recorder.time.sleep'): setup.side_effect = ImportError("driver not found") - rec = Recorder(hass, uri='sqlite://', include={}, exclude={}) + rec = Recorder(hass, keep_days=7, purge_interval=2, + uri='sqlite://', include={}, exclude={}) rec.start() rec.join() From be9cdf51d9ec39764441bc493ff71f66abf23cd6 Mon Sep 17 00:00:00 2001 From: NovapaX Date: Fri, 3 Nov 2017 04:55:09 +0100 Subject: [PATCH 04/20] update mask-icon to a working mask-icon.svg (#10290) * update mask-icon to favicon.svg * change name of icon to mask-icon.svg --- homeassistant/components/frontend/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/frontend/templates/index.html b/homeassistant/components/frontend/templates/index.html index 41d17347de8..c941fbc15ae 100644 --- a/homeassistant/components/frontend/templates/index.html +++ b/homeassistant/components/frontend/templates/index.html @@ -8,7 +8,7 @@ - + {% if not dev_mode %} {% for panel in panels.values() -%} From 1e92417804ddc8c5ea2eb9a5d857d0a8ce3e25ab Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 2 Nov 2017 22:18:10 -0700 Subject: [PATCH 05/20] Cleanup Xiaomi Aqara (#10302) --- homeassistant/components/xiaomi_aqara.py | 230 +++++++++++------------ 1 file changed, 108 insertions(+), 122 deletions(-) diff --git a/homeassistant/components/xiaomi_aqara.py b/homeassistant/components/xiaomi_aqara.py index de4fad503c9..26950322857 100644 --- a/homeassistant/components/xiaomi_aqara.py +++ b/homeassistant/components/xiaomi_aqara.py @@ -1,4 +1,5 @@ """Support for Xiaomi Gateways.""" +import asyncio import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv @@ -17,6 +18,7 @@ ATTR_DEVICE_ID = 'device_id' CONF_DISCOVERY_RETRY = 'discovery_retry' CONF_GATEWAYS = 'gateways' CONF_INTERFACE = 'interface' +CONF_KEY = 'key' DOMAIN = 'xiaomi_aqara' PY_XIAOMI_GATEWAY = "xiaomi_gw" @@ -25,76 +27,57 @@ SERVICE_STOP_RINGTONE = 'stop_ringtone' SERVICE_ADD_DEVICE = 'add_device' SERVICE_REMOVE_DEVICE = 'remove_device' -XIAOMI_AQARA_SERVICE_SCHEMA = vol.Schema({ - vol.Required(ATTR_GW_MAC): vol.All(cv.string, - vol.Any(vol.Length(min=12, max=12), - vol.Length(min=17, max=17))) + +GW_MAC = vol.All( + cv.string, + lambda value: value.replace(':', '').lower(), + vol.Length(min=12, max=12) +) + + +SERVICE_SCHEMA_PLAY_RINGTONE = vol.Schema({ + vol.Required(ATTR_RINGTONE_ID): + vol.All(vol.Coerce(int), vol.NotIn([9, 14, 15, 16, 17, 18, 19])), + vol.Optional(ATTR_RINGTONE_VOL): + vol.All(vol.Coerce(int), vol.Clamp(min=0, max=100)) }) -SERVICE_SCHEMA_PLAY_RINGTONE = XIAOMI_AQARA_SERVICE_SCHEMA.extend({ - vol.Required(ATTR_RINGTONE_ID): vol.Coerce(int), - vol.Optional(ATTR_RINGTONE_VOL): vol.All(vol.Coerce(int), - vol.Clamp(min=0, max=100)) +SERVICE_SCHEMA_REMOVE_DEVICE = vol.Schema({ + vol.Required(ATTR_DEVICE_ID): + vol.All(cv.string, vol.Length(min=14, max=14)) }) -SERVICE_SCHEMA_REMOVE_DEVICE = XIAOMI_AQARA_SERVICE_SCHEMA.extend({ - vol.Required(ATTR_DEVICE_ID): vol.All(cv.string, - vol.Length(min=14, max=14)) + +GATEWAY_CONFIG = vol.Schema({ + vol.Optional(CONF_MAC): GW_MAC, + vol.Optional(CONF_KEY, default=None): + vol.All(cv.string, vol.Length(min=16, max=16)), + vol.Optional(CONF_HOST): cv.string, + vol.Optional(CONF_PORT, default=9898): cv.port, }) -SERVICE_TO_METHOD = { - SERVICE_PLAY_RINGTONE: {'method': 'play_ringtone_service', - 'schema': SERVICE_SCHEMA_PLAY_RINGTONE}, - SERVICE_STOP_RINGTONE: {'method': 'stop_ringtone_service'}, - SERVICE_ADD_DEVICE: {'method': 'add_device_service'}, - SERVICE_REMOVE_DEVICE: {'method': 'remove_device_service', - 'schema': SERVICE_SCHEMA_REMOVE_DEVICE}, -} + +def _fix_conf_defaults(config): + """Update some config defaults.""" + config['sid'] = config.pop(CONF_MAC, None) + + if config.get(CONF_KEY) is None: + _LOGGER.warning( + 'Key is not provided for gateway %s. Controlling the gateway ' + 'will not be possible.', config['sid']) + + if config.get(CONF_HOST) is None: + config.pop(CONF_PORT) + + return config -def _validate_conf(config): - """Validate a list of devices definitions.""" - res_config = [] - for gw_conf in config: - for _conf in gw_conf.keys(): - if _conf not in [CONF_MAC, CONF_HOST, CONF_PORT, 'key']: - raise vol.Invalid('{} is not a valid config parameter'. - format(_conf)) - - res_gw_conf = {'sid': gw_conf.get(CONF_MAC)} - if res_gw_conf['sid'] is not None: - res_gw_conf['sid'] = res_gw_conf['sid'].replace(":", "").lower() - if len(res_gw_conf['sid']) != 12: - raise vol.Invalid('Invalid mac address', gw_conf.get(CONF_MAC)) - key = gw_conf.get('key') - - if key is None: - _LOGGER.warning( - 'Gateway Key is not provided.' - ' Controlling gateway device will not be possible.') - elif len(key) != 16: - raise vol.Invalid('Invalid key {}.' - ' Key must be 16 characters'.format(key)) - res_gw_conf['key'] = key - - host = gw_conf.get(CONF_HOST) - if host is not None: - res_gw_conf[CONF_HOST] = host - res_gw_conf['port'] = gw_conf.get(CONF_PORT, 9898) - - _LOGGER.warning( - 'Static address (%s:%s) of the gateway provided. ' - 'Discovery of this host will be skipped.', - res_gw_conf[CONF_HOST], res_gw_conf[CONF_PORT]) - - res_config.append(res_gw_conf) - return res_config - +DEFAULT_GATEWAY_CONFIG = [{CONF_MAC: None, CONF_KEY: None}] CONFIG_SCHEMA = vol.Schema({ DOMAIN: vol.Schema({ - vol.Optional(CONF_GATEWAYS, default=[{CONF_MAC: None, "key": None}]): - vol.All(cv.ensure_list, _validate_conf), + vol.Optional(CONF_GATEWAYS, default=DEFAULT_GATEWAY_CONFIG): + vol.All(cv.ensure_list, [GATEWAY_CONFIG], [_fix_conf_defaults]), vol.Optional(CONF_INTERFACE, default='any'): cv.string, vol.Optional(CONF_DISCOVERY_RETRY, default=3): cv.positive_int }) @@ -113,30 +96,30 @@ def setup(hass, config): interface = config[DOMAIN][CONF_INTERFACE] discovery_retry = config[DOMAIN][CONF_DISCOVERY_RETRY] + @asyncio.coroutine def xiaomi_gw_discovered(service, discovery_info): """Called when Xiaomi Gateway device(s) has been found.""" # We don't need to do anything here, the purpose of HA's # discovery service is to just trigger loading of this # component, and then its own discovery process kicks in. - _LOGGER.info("Discovered: %s", discovery_info) discovery.listen(hass, SERVICE_XIAOMI_GW, xiaomi_gw_discovered) from PyXiaomiGateway import PyXiaomiGateway - hass.data[PY_XIAOMI_GATEWAY] = PyXiaomiGateway(hass.add_job, gateways, - interface) + xiaomi = hass.data[PY_XIAOMI_GATEWAY] = PyXiaomiGateway( + hass.add_job, gateways, interface) _LOGGER.debug("Expecting %s gateways", len(gateways)) for k in range(discovery_retry): _LOGGER.info('Discovering Xiaomi Gateways (Try %s)', k + 1) - hass.data[PY_XIAOMI_GATEWAY].discover_gateways() - if len(hass.data[PY_XIAOMI_GATEWAY].gateways) >= len(gateways): + xiaomi.discover_gateways() + if len(xiaomi.gateways) >= len(gateways): break - if not hass.data[PY_XIAOMI_GATEWAY].gateways: + if not xiaomi.gateways: _LOGGER.error("No gateway discovered") return False - hass.data[PY_XIAOMI_GATEWAY].listen() + xiaomi.listen() _LOGGER.debug("Gateways discovered. Listening for broadcasts") for component in ['binary_sensor', 'sensor', 'switch', 'light', 'cover']: @@ -145,81 +128,60 @@ def setup(hass, config): def stop_xiaomi(event): """Stop Xiaomi Socket.""" _LOGGER.info("Shutting down Xiaomi Hub.") - hass.data[PY_XIAOMI_GATEWAY].stop_listen() + xiaomi.stop_listen() + hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_xiaomi) - # pylint: disable=unused-variable def play_ringtone_service(call): """Service to play ringtone through Gateway.""" - ring_id = int(call.data.get(ATTR_RINGTONE_ID)) - gw_sid = call.data.get(ATTR_GW_MAC).replace(":", "").lower() + ring_id = call.data.get(ATTR_RINGTONE_ID) + gateway = call.data.get(ATTR_GW_MAC) - if ring_id in [9, 14-19]: - _LOGGER.error('Specified mid: %s is not defined in gateway.', - ring_id) - return + kwargs = {'mid': ring_id} ring_vol = call.data.get(ATTR_RINGTONE_VOL) - if ring_vol is None: - ringtone = {'mid': ring_id} - else: - ringtone = {'mid': ring_id, 'vol': int(ring_vol)} + if ring_vol is not None: + kwargs['vol'] = ring_vol - for (_, gateway) in hass.data[PY_XIAOMI_GATEWAY].gateways.items(): - if gateway.sid == gw_sid: - gateway.write_to_hub(gateway.sid, **ringtone) - break - else: - _LOGGER.error('Unknown gateway sid: %s was specified.', gw_sid) + gateway.write_to_hub(gateway.sid, **kwargs) - # pylint: disable=unused-variable def stop_ringtone_service(call): """Service to stop playing ringtone on Gateway.""" - gw_sid = call.data.get(ATTR_GW_MAC).replace(":", "").lower() - for (_, gateway) in hass.data[PY_XIAOMI_GATEWAY].gateways.items(): - if gateway.sid == gw_sid: - ringtone = {'mid': 10000} - gateway.write_to_hub(gateway.sid, **ringtone) - break - else: - _LOGGER.error('Unknown gateway sid: %s was specified.', gw_sid) + gateway = call.data.get(ATTR_GW_MAC) + gateway.write_to_hub(gateway.sid, mid=10000) - # pylint: disable=unused-variable def add_device_service(call): """Service to add a new sub-device within the next 30 seconds.""" - gw_sid = call.data.get(ATTR_GW_MAC).replace(":", "").lower() - for (_, gateway) in hass.data[PY_XIAOMI_GATEWAY].gateways.items(): - if gateway.sid == gw_sid: - join_permission = {'join_permission': 'yes'} - gateway.write_to_hub(gateway.sid, **join_permission) - hass.components.persistent_notification.async_create( - 'Join permission enabled for 30 seconds! ' - 'Please press the pairing button of the new device once.', - title='Xiaomi Aqara Gateway') - break - else: - _LOGGER.error('Unknown gateway sid: %s was specified.', gw_sid) + gateway = call.data.get(ATTR_GW_MAC) + gateway.write_to_hub(gateway.sid, join_permission='yes') + hass.components.persistent_notification.async_create( + 'Join permission enabled for 30 seconds! ' + 'Please press the pairing button of the new device once.', + title='Xiaomi Aqara Gateway') - # pylint: disable=unused-variable def remove_device_service(call): """Service to remove a sub-device from the gateway.""" device_id = call.data.get(ATTR_DEVICE_ID) - gw_sid = call.data.get(ATTR_GW_MAC).replace(":", "").lower() - remove_device = {'remove_device': device_id} - for (_, gateway) in hass.data[PY_XIAOMI_GATEWAY].gateways.items(): - if gateway.sid == gw_sid: - gateway.write_to_hub(gateway.sid, **remove_device) - break - else: - _LOGGER.error('Unknown gateway sid: %s was specified.', gw_sid) + gateway = call.data.get(ATTR_GW_MAC) + gateway.write_to_hub(gateway.sid, remove_device=device_id) - for xiaomi_aqara_service in SERVICE_TO_METHOD: - schema = SERVICE_TO_METHOD[xiaomi_aqara_service].get( - 'schema', XIAOMI_AQARA_SERVICE_SCHEMA) - service_handler = SERVICE_TO_METHOD[xiaomi_aqara_service].get('method') - hass.services.async_register( - DOMAIN, xiaomi_aqara_service, service_handler, - description=None, schema=schema) + gateway_only_schema = _add_gateway_to_schema(xiaomi, vol.Schema({})) + + hass.services.async_register( + DOMAIN, SERVICE_PLAY_RINGTONE, play_ringtone_service, + schema=_add_gateway_to_schema(xiaomi, SERVICE_SCHEMA_PLAY_RINGTONE)) + + hass.services.async_register( + DOMAIN, SERVICE_STOP_RINGTONE, stop_ringtone_service, + schema=gateway_only_schema) + + hass.services.async_register( + DOMAIN, SERVICE_ADD_DEVICE, add_device_service, + schema=gateway_only_schema) + + hass.services.async_register( + DOMAIN, SERVICE_REMOVE_DEVICE, remove_device_service, + schema=_add_gateway_to_schema(xiaomi, SERVICE_SCHEMA_REMOVE_DEVICE)) return True @@ -276,3 +238,27 @@ class XiaomiDevice(Entity): def parse_data(self, data): """Parse data sent by gateway.""" raise NotImplementedError() + + +def _add_gateway_to_schema(xiaomi, schema): + """Extend a voluptuous schema with a gateway validator.""" + def gateway(sid): + """Convert sid to a gateway.""" + sid = str(sid).replace(':', '').lower() + + for gateway in xiaomi.gateways.values(): + if gateway.sid == sid: + return gateway + + raise vol.Invalid('Unknown gateway sid {}'.format(sid)) + + gateways = list(xiaomi.gateways.values()) + kwargs = {} + + # If the user has only 1 gateway, make it the default for services. + if len(gateways) == 1: + kwargs['default'] = gateways[0] + + return schema.extend({ + vol.Required(ATTR_GW_MAC, **kwargs): gateway + }) From 8ed75217e1498e36840d0f2e2c18981765ffdf51 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 3 Nov 2017 02:28:31 -0700 Subject: [PATCH 06/20] Fix panel_custom (#10303) * Fix panel_custom * lint --- homeassistant/components/panel_custom.py | 2 +- tests/components/test_panel_custom.py | 38 +++++++++++------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/homeassistant/components/panel_custom.py b/homeassistant/components/panel_custom.py index 0c857f1abd4..473d44f3b55 100644 --- a/homeassistant/components/panel_custom.py +++ b/homeassistant/components/panel_custom.py @@ -61,7 +61,7 @@ def async_setup(hass, config): name, panel_path, sidebar_title=panel.get(CONF_SIDEBAR_TITLE), sidebar_icon=panel.get(CONF_SIDEBAR_ICON), - url_path=panel.get(CONF_URL_PATH), + frontend_url_path=panel.get(CONF_URL_PATH), config=panel.get(CONF_CONFIG), ) diff --git a/tests/components/test_panel_custom.py b/tests/components/test_panel_custom.py index b032d91a553..d33221da2a7 100644 --- a/tests/components/test_panel_custom.py +++ b/tests/components/test_panel_custom.py @@ -5,21 +5,19 @@ from unittest.mock import Mock, patch import pytest from homeassistant import setup +from homeassistant.components import frontend -from tests.common import mock_coro, mock_component +from tests.common import mock_component -@pytest.fixture -def mock_register(hass): - """Mock the frontend component being loaded and yield register method.""" +@pytest.fixture(autouse=True) +def mock_frontend_loaded(hass): + """Mock frontend is loaded.""" mock_component(hass, 'frontend') - with patch('homeassistant.components.frontend.async_register_panel', - return_value=mock_coro()) as mock_register: - yield mock_register @asyncio.coroutine -def test_webcomponent_custom_path_not_found(hass, mock_register): +def test_webcomponent_custom_path_not_found(hass): """Test if a web component is found in config panels dir.""" filename = 'mock.file' @@ -39,11 +37,11 @@ def test_webcomponent_custom_path_not_found(hass, mock_register): hass, 'panel_custom', config ) assert not result - assert not mock_register.called + assert len(hass.data.get(frontend.DATA_PANELS, {})) == 0 @asyncio.coroutine -def test_webcomponent_custom_path(hass, mock_register): +def test_webcomponent_custom_path(hass): """Test if a web component is found in config panels dir.""" filename = 'mock.file' @@ -65,15 +63,15 @@ def test_webcomponent_custom_path(hass, mock_register): ) assert result - assert mock_register.called + panels = hass.data.get(frontend.DATA_PANELS, []) - args = mock_register.mock_calls[0][1] - assert args == (hass, 'todomvc', filename) + assert len(panels) == 1 + assert 'nice_url' in panels - kwargs = mock_register.mock_calls[0][2] - assert kwargs == { - 'config': 5, - 'url_path': 'nice_url', - 'sidebar_icon': 'mdi:iconicon', - 'sidebar_title': 'Sidebar Title' - } + panel = panels['nice_url'] + + assert panel.config == 5 + assert panel.frontend_url_path == 'nice_url' + assert panel.sidebar_icon == 'mdi:iconicon' + assert panel.sidebar_title == 'Sidebar Title' + assert panel.path == filename From 52f40b3370af2c1d95c2be8df85457f28b4fdda9 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 2 Nov 2017 23:30:05 -0700 Subject: [PATCH 07/20] Cloud: Authenticate with id token (#10304) --- homeassistant/components/cloud/iot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/cloud/iot.py b/homeassistant/components/cloud/iot.py index 92b517b570c..1bb6668e0cc 100644 --- a/homeassistant/components/cloud/iot.py +++ b/homeassistant/components/cloud/iot.py @@ -62,7 +62,7 @@ class CloudIoT: self.client = client = yield from session.ws_connect( self.cloud.relayer, headers={ hdrs.AUTHORIZATION: - 'Bearer {}'.format(self.cloud.access_token) + 'Bearer {}'.format(self.cloud.id_token) }) self.tries = 0 From e90e94b667c63063e9a1b004789c6480973d1219 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Fri, 3 Nov 2017 15:38:15 +0100 Subject: [PATCH 08/20] Allow an empty MAC address at the Xiaomi Aqara Gateway configuration. (#10307) --- homeassistant/components/xiaomi_aqara.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/xiaomi_aqara.py b/homeassistant/components/xiaomi_aqara.py index 26950322857..f875edef310 100644 --- a/homeassistant/components/xiaomi_aqara.py +++ b/homeassistant/components/xiaomi_aqara.py @@ -49,7 +49,7 @@ SERVICE_SCHEMA_REMOVE_DEVICE = vol.Schema({ GATEWAY_CONFIG = vol.Schema({ - vol.Optional(CONF_MAC): GW_MAC, + vol.Optional(CONF_MAC, default=None): vol.Any(GW_MAC, None), vol.Optional(CONF_KEY, default=None): vol.All(cv.string, vol.Length(min=16, max=16)), vol.Optional(CONF_HOST): cv.string, From 8dd790e745d2259335669bf2377d4ab46d5023cc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Nov 2017 13:51:17 +0100 Subject: [PATCH 09/20] Upgrade credstash to 1.14.0 (#10310) --- homeassistant/scripts/credstash.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/scripts/credstash.py b/homeassistant/scripts/credstash.py index c54de236070..12516e55c7d 100644 --- a/homeassistant/scripts/credstash.py +++ b/homeassistant/scripts/credstash.py @@ -4,7 +4,7 @@ import getpass from homeassistant.util.yaml import _SECRET_NAMESPACE -REQUIREMENTS = ['credstash==1.13.3', 'botocore==1.7.34'] +REQUIREMENTS = ['credstash==1.14.0', 'botocore==1.7.34'] def run(args): diff --git a/requirements_all.txt b/requirements_all.txt index acfcb7d4745..a3388e84f69 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -170,7 +170,7 @@ colorlog==3.0.1 concord232==0.14 # homeassistant.scripts.credstash -# credstash==1.13.3 +# credstash==1.14.0 # homeassistant.components.sensor.crimereports crimereports==1.0.0 From cdc2df012ce19c6f1c254d86f98441272f962d02 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 3 Nov 2017 20:31:48 +0100 Subject: [PATCH 10/20] TellStick / Remove async flavor / add hassio (#10315) * Remove unused async flavor * Add tellcore-net support * Update tellstick.py * Update requirements_all.txt * fix lint --- homeassistant/components/tellstick.py | 34 +++++++++++++++++++++------ requirements_all.txt | 3 +++ 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/tellstick.py b/homeassistant/components/tellstick.py index 6ae96b88da7..85407ff4c7a 100644 --- a/homeassistant/components/tellstick.py +++ b/homeassistant/components/tellstick.py @@ -10,16 +10,18 @@ import threading import voluptuous as vol from homeassistant.helpers import discovery -from homeassistant.const import EVENT_HOMEASSISTANT_STOP +from homeassistant.const import ( + EVENT_HOMEASSISTANT_STOP, CONF_HOST, CONF_PORT) from homeassistant.helpers.entity import Entity +import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['tellcore-py==1.1.2'] +REQUIREMENTS = ['tellcore-py==1.1.2', 'tellcore-net==0.1'] _LOGGER = logging.getLogger(__name__) ATTR_DISCOVER_CONFIG = 'config' ATTR_DISCOVER_DEVICES = 'devices' -ATTR_SIGNAL_REPETITIONS = 'signal_repetitions' +CONF_SIGNAL_REPETITIONS = 'signal_repetitions' DEFAULT_SIGNAL_REPETITIONS = 1 DOMAIN = 'tellstick' @@ -34,7 +36,9 @@ TELLCORE_REGISTRY = None CONFIG_SCHEMA = vol.Schema({ DOMAIN: vol.Schema({ - vol.Optional(ATTR_SIGNAL_REPETITIONS, + vol.Inclusive(CONF_HOST, 'tellcore-net'): cv.string, + vol.Inclusive(CONF_PORT, 'tellcore-net'): cv.port, + vol.Optional(CONF_SIGNAL_REPETITIONS, default=DEFAULT_SIGNAL_REPETITIONS): vol.Coerce(int), }), }, extra=vol.ALLOW_EXTRA) @@ -48,7 +52,7 @@ def _discover(hass, config, component_name, found_tellcore_devices): _LOGGER.info("Discovered %d new %s devices", len(found_tellcore_devices), component_name) - signal_repetitions = config[DOMAIN].get(ATTR_SIGNAL_REPETITIONS) + signal_repetitions = config[DOMAIN].get(CONF_SIGNAL_REPETITIONS) discovery.load_platform(hass, component_name, DOMAIN, { ATTR_DISCOVER_DEVICES: found_tellcore_devices, @@ -58,12 +62,28 @@ def _discover(hass, config, component_name, found_tellcore_devices): def setup(hass, config): """Set up the Tellstick component.""" from tellcore.constants import TELLSTICK_DIM - from tellcore.telldus import AsyncioCallbackDispatcher + from tellcore.telldus import QueuedCallbackDispatcher from tellcore.telldus import TelldusCore + from tellcorenet import TellCoreClient + + conf = config.get(DOMAIN, {}) + net_host = conf.get(CONF_HOST) + net_port = conf.get(CONF_PORT) + + # Initialize remote tellcore client + if net_host and net_port: + net_client = TellCoreClient(net_host, net_port) + net_client.start() + + def stop_tellcore_net(event): + """Event handler to stop the client.""" + net_client.stop() + + hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_tellcore_net) try: tellcore_lib = TelldusCore( - callback_dispatcher=AsyncioCallbackDispatcher(hass.loop)) + callback_dispatcher=QueuedCallbackDispatcher()) except OSError: _LOGGER.exception("Could not initialize Tellstick") return False diff --git a/requirements_all.txt b/requirements_all.txt index a3388e84f69..8d606d4d257 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1042,6 +1042,9 @@ tank_utility==1.4.0 # homeassistant.components.binary_sensor.tapsaff tapsaff==0.1.3 +# homeassistant.components.tellstick +tellcore-net==0.1 + # homeassistant.components.tellstick # homeassistant.components.sensor.tellstick tellcore-py==1.1.2 From 96f19c720519660886bc8f06508f67ba99304109 Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Fri, 3 Nov 2017 11:58:03 -0400 Subject: [PATCH 11/20] Strip white space from configurator input (#10317) --- homeassistant/components/wink/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/wink/__init__.py b/homeassistant/components/wink/__init__.py index 32e5938f6c7..426893ec306 100644 --- a/homeassistant/components/wink/__init__.py +++ b/homeassistant/components/wink/__init__.py @@ -160,7 +160,6 @@ def _request_app_setup(hass, config): hass.data[DOMAIN]['configurator'] = True configurator = hass.components.configurator - # pylint: disable=unused-argument def wink_configuration_callback(callback_data): """Handle configuration updates.""" _config_path = hass.config.path(WINK_CONFIG_FILE) @@ -168,8 +167,8 @@ def _request_app_setup(hass, config): setup(hass, config) return - client_id = callback_data.get('client_id') - client_secret = callback_data.get('client_secret') + client_id = callback_data.get('client_id').strip() + client_secret = callback_data.get('client_secret').strip() if None not in (client_id, client_secret): save_json(_config_path, {ATTR_CLIENT_ID: client_id, From 986bcfef213cac8f9856ad815ff8ef16a0a7a2ff Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 3 Nov 2017 20:55:00 +0100 Subject: [PATCH 12/20] Fix recorder purge (#10318) * Fix recorder purge * Fix lint * fix utc convert --- homeassistant/components/recorder/__init__.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/recorder/__init__.py b/homeassistant/components/recorder/__init__.py index df19f0125ef..e9b08941b83 100644 --- a/homeassistant/components/recorder/__init__.py +++ b/homeassistant/components/recorder/__init__.py @@ -260,15 +260,12 @@ class Recorder(threading.Thread): notify_hass_started) if self.keep_days and self.purge_interval: - async_track_point_in_time = \ - self.hass.helpers.event.async_track_point_in_time - @callback def async_purge(now): """Trigger the purge and schedule the next run.""" self.queue.put(PurgeTask(self.keep_days)) - async_track_point_in_time(async_purge, now + timedelta( - days=self.purge_interval)) + self.hass.helpers.event.async_track_point_in_time( + async_purge, now + timedelta(days=self.purge_interval)) earliest = dt_util.utcnow() + timedelta(minutes=30) run = latest = dt_util.utcnow() + \ @@ -277,12 +274,11 @@ class Recorder(threading.Thread): event = session.query(Events).first() if event is not None: session.expunge(event) - run = dt_util.UTC.localize(event.time_fired) + \ + run = dt_util.as_utc(event.time_fired) + \ timedelta(days=self.keep_days+self.purge_interval) run = min(latest, max(run, earliest)) - - _LOGGER.debug("Scheduling purge run for %s", run) - async_track_point_in_time(async_purge, run) + self.hass.helpers.event.async_track_point_in_time( + async_purge, run) self.hass.add_job(register) result = hass_started.result() From af0253b2ebed999c355eeb7ba2dd0929442f0e26 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 3 Nov 2017 10:12:45 -0700 Subject: [PATCH 13/20] Fix formatting invalid config text (#10319) --- homeassistant/config.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/homeassistant/config.py b/homeassistant/config.py index 89289378c76..c4c96804fca 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -677,9 +677,18 @@ def async_notify_setup_error(hass, component, link=False): errors = hass.data[DATA_PERSISTENT_ERRORS] = {} errors[component] = errors.get(component) or link - _lst = [HA_COMPONENT_URL.format(name.replace('_', '-'), name) - if link else name for name, link in errors.items()] - message = ('The following components and platforms could not be set up:\n' - '* ' + '\n* '.join(list(_lst)) + '\nPlease check your config') + + message = 'The following components and platforms could not be set up:\n\n' + + for name, link in errors.items(): + if link: + part = HA_COMPONENT_URL.format(name.replace('_', '-'), name) + else: + part = name + + message += ' - {}\n'.format(part) + + message += '\nPlease check your config.' + persistent_notification.async_create( hass, message, 'Invalid config', 'invalid_config') From fe271749c29edf14eb47f61bdbb0145be2c24183 Mon Sep 17 00:00:00 2001 From: "Craig J. Ward" Date: Fri, 3 Nov 2017 22:46:40 -0500 Subject: [PATCH 14/20] Tc update (#10322) * use updated client * update requirements --- homeassistant/components/alarm_control_panel/totalconnect.py | 2 +- requirements_all.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/alarm_control_panel/totalconnect.py b/homeassistant/components/alarm_control_panel/totalconnect.py index 05dc8aeef20..7abdf5efcab 100644 --- a/homeassistant/components/alarm_control_panel/totalconnect.py +++ b/homeassistant/components/alarm_control_panel/totalconnect.py @@ -16,7 +16,7 @@ from homeassistant.const import ( STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, STATE_ALARM_DISARMED, STATE_ALARM_ARMING, STATE_ALARM_DISARMING, STATE_UNKNOWN, CONF_NAME) -REQUIREMENTS = ['total_connect_client==0.11'] +REQUIREMENTS = ['total_connect_client==0.12'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 8d606d4d257..b5e8039240e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1071,7 +1071,7 @@ todoist-python==7.0.17 toonlib==1.0.2 # homeassistant.components.alarm_control_panel.totalconnect -total_connect_client==0.11 +total_connect_client==0.12 # homeassistant.components.sensor.transmission # homeassistant.components.switch.transmission From 21273de6a18ba1fc503b5bcf391151720770104a Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sat, 4 Nov 2017 05:10:08 +0100 Subject: [PATCH 15/20] Move timer into correct folder (#10324) * Move timer into correct folder * Rename tests/components/test_timer.py to tests/components/timer/test_timer.py * create init for test component * Fix services.yaml loading --- homeassistant/components/{timer.py => timer/__init__.py} | 4 ++-- tests/components/timer/__init__.py | 1 + tests/components/{test_timer.py => timer/test_init.py} | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename homeassistant/components/{timer.py => timer/__init__.py} (98%) create mode 100644 tests/components/timer/__init__.py rename tests/components/{test_timer.py => timer/test_init.py} (100%) diff --git a/homeassistant/components/timer.py b/homeassistant/components/timer/__init__.py similarity index 98% rename from homeassistant/components/timer.py rename to homeassistant/components/timer/__init__.py index 4d21cca40bb..b2f5db88b5f 100644 --- a/homeassistant/components/timer.py +++ b/homeassistant/components/timer/__init__.py @@ -166,8 +166,8 @@ def async_setup(hass, config): yield from asyncio.wait(tasks, loop=hass.loop) descriptions = yield from hass.async_add_job( - load_yaml_config_file, os.path.join( - os.path.dirname(__file__), os.path.join(DOMAIN, 'services.yaml')) + load_yaml_config_file, + os.path.join(os.path.dirname(__file__), 'services.yaml') ) hass.services.async_register( diff --git a/tests/components/timer/__init__.py b/tests/components/timer/__init__.py new file mode 100644 index 00000000000..160fc633701 --- /dev/null +++ b/tests/components/timer/__init__.py @@ -0,0 +1 @@ +"""Test env for timer component.""" diff --git a/tests/components/test_timer.py b/tests/components/timer/test_init.py similarity index 100% rename from tests/components/test_timer.py rename to tests/components/timer/test_init.py From 640729f312827364a8162760722661a320c08f18 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 4 Nov 2017 12:52:39 -0700 Subject: [PATCH 16/20] Version bump to 0.57.1 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 1c84c9d57f1..55e9f6a9c04 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 57 -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 af3d9d8245d386d98e3f241a5c66cd9b7d3d65dd Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 4 Nov 2017 12:53:09 -0700 Subject: [PATCH 17/20] Update frontend to 20171104.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 d354557fa0f..8285d47a4d8 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -21,7 +21,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==20171103.0'] +REQUIREMENTS = ['home-assistant-frontend==20171104.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api'] diff --git a/requirements_all.txt b/requirements_all.txt index b5e8039240e..0ea1dc8e4c2 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -330,7 +330,7 @@ hipnotify==1.0.8 holidays==0.8.1 # homeassistant.components.frontend -home-assistant-frontend==20171103.0 +home-assistant-frontend==20171104.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 62aaf4c3b5f..ab8b7e45137 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -74,7 +74,7 @@ hbmqtt==0.8 holidays==0.8.1 # homeassistant.components.frontend -home-assistant-frontend==20171103.0 +home-assistant-frontend==20171104.0 # homeassistant.components.influxdb # homeassistant.components.sensor.influxdb From 73cd902857b376f563883f940b905e5abc9e0383 Mon Sep 17 00:00:00 2001 From: Patrik Date: Sun, 5 Nov 2017 17:43:45 +0100 Subject: [PATCH 18/20] Fix tradfri problem with brightness (#10359) * Fix problem with brightness * Fix typo * Typo --- homeassistant/components/light/tradfri.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant/components/light/tradfri.py b/homeassistant/components/light/tradfri.py index c71ca60ee03..63441e6d8af 100644 --- a/homeassistant/components/light/tradfri.py +++ b/homeassistant/components/light/tradfri.py @@ -108,6 +108,9 @@ class TradfriGroup(Light): keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10 if ATTR_BRIGHTNESS in kwargs: + if kwargs[ATTR_BRIGHTNESS] == 255: + kwargs[ATTR_BRIGHTNESS] = 254 + self.hass.async_add_job(self._api( self._group.set_dimmer(kwargs[ATTR_BRIGHTNESS], **keys))) else: @@ -264,6 +267,9 @@ class TradfriLight(Light): keys['transition_time'] = int(kwargs[ATTR_TRANSITION]) * 10 if ATTR_BRIGHTNESS in kwargs: + if kwargs[ATTR_BRIGHTNESS] == 255: + kwargs[ATTR_BRIGHTNESS] = 254 + self.hass.async_add_job(self._api( self._light_control.set_dimmer(kwargs[ATTR_BRIGHTNESS], **keys))) From ce0537ef7f28af34ba76251867f8a63927d69ab5 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 5 Nov 2017 12:49:54 -0800 Subject: [PATCH 19/20] Update frontend to 20171105.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 8285d47a4d8..f9c9e2ddcaf 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -21,7 +21,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==20171104.0'] +REQUIREMENTS = ['home-assistant-frontend==20171105.0'] DOMAIN = 'frontend' DEPENDENCIES = ['api', 'websocket_api'] diff --git a/requirements_all.txt b/requirements_all.txt index 0ea1dc8e4c2..a2aa2bb1057 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -330,7 +330,7 @@ hipnotify==1.0.8 holidays==0.8.1 # homeassistant.components.frontend -home-assistant-frontend==20171104.0 +home-assistant-frontend==20171105.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 ab8b7e45137..cb26016687d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -74,7 +74,7 @@ hbmqtt==0.8 holidays==0.8.1 # homeassistant.components.frontend -home-assistant-frontend==20171104.0 +home-assistant-frontend==20171105.0 # homeassistant.components.influxdb # homeassistant.components.sensor.influxdb From 210bbc53a448cec7f0cf62189655c4f69b376d59 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 5 Nov 2017 12:50:06 -0800 Subject: [PATCH 20/20] Update version to 0.57.2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 55e9f6a9c04..64ccc1cc395 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 57 -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)