diff --git a/.travis.yml b/.travis.yml index e1cfad31623..b9427d41b24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,6 @@ install: script: - flake8 homeassistant --exclude bower_components,external - pylint homeassistant - - coverage run --source=homeassistant -m unittest discover tests + - coverage run --source=homeassistant --omit "homeassistant/external/*" -m unittest discover tests after_success: - coveralls diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 07dc46692d1..aa95878c649 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -17,7 +17,7 @@ from collections import defaultdict import homeassistant import homeassistant.loader as loader import homeassistant.components as core_components - +import homeassistant.components.group as group _LOGGER = logging.getLogger(__name__) @@ -35,6 +35,11 @@ def setup_component(hass, domain, config=None): _LOGGER.info("component %s initialized", domain) + # Assumption: if a component does not depend on groups + # it communicates with devices + if group.DOMAIN not in component.DEPENDENCIES: + hass.pool.add_worker() + return True else: @@ -75,18 +80,8 @@ def from_config_dict(config, hass=None): _LOGGER.info("Home Assistant core initialized") # Setup the components - - # We assume that all components that load before the group component loads - # are components that poll devices. As their tasks are IO based, we will - # add an extra worker for each of them. - add_worker = True - for domain in loader.load_order_components(components): - if setup_component(hass, domain, config): - add_worker = add_worker and domain != "group" - - if add_worker: - hass.pool.add_worker() + setup_component(hass, domain, config) return hass diff --git a/homeassistant/components/discovery.py b/homeassistant/components/discovery.py index c9f770dc4ea..fde6061dfaa 100644 --- a/homeassistant/components/discovery.py +++ b/homeassistant/components/discovery.py @@ -68,8 +68,7 @@ def setup(hass, config): logger.info("Found new service: %s %s", service, info) if component and component not in hass.components: - if bootstrap.setup_component(hass, component, config): - hass.pool.add_worker() + bootstrap.setup_component(hass, component, config) hass.bus.fire(EVENT_PLATFORM_DISCOVERED, { ATTR_SERVICE: service, diff --git a/homeassistant/components/http/frontend.py b/homeassistant/components/http/frontend.py index a7e66f2c3ea..f2c3eaafad7 100644 --- a/homeassistant/components/http/frontend.py +++ b/homeassistant/components/http/frontend.py @@ -1,2 +1,2 @@ """ DO NOT MODIFY. Auto-generated by build_frontend script """ -VERSION = "b32ea78a1157b29555410384fe251dc9" +VERSION = "a82c6e4bf6b91042a6e891d46464275d" diff --git a/homeassistant/components/http/www_static/frontend.html b/homeassistant/components/http/www_static/frontend.html index 5bcdce08fea..5bf747f031e 100644 --- a/homeassistant/components/http/www_static/frontend.html +++ b/homeassistant/components/http/www_static/frontend.html @@ -60,15 +60,18 @@ if(this.removeAttribute(a),d)return j(this,a,c);var e=c,f=m(this,a,e);return j(t {{stateObj.stateDisplay}}
Currently: {{stateObj.attributes.current_temperature}} {{stateObj.attributes.unit_of_measurement}} -
+