diff --git a/homeassistant/components/sensor/loopenergy.py b/homeassistant/components/sensor/loopenergy.py index 5a04275dbde..0c9cc341be3 100644 --- a/homeassistant/components/sensor/loopenergy.py +++ b/homeassistant/components/sensor/loopenergy.py @@ -7,12 +7,13 @@ https://home-assistant.io/components/sensor.loop_energy/ import logging from homeassistant.helpers.entity import Entity +from homeassistant.const import EVENT_HOMEASSISTANT_STOP _LOGGER = logging.getLogger(__name__) DOMAIN = "loopenergy" -REQUIREMENTS = ['pyloopenergy==0.0.4'] +REQUIREMENTS = ['pyloopenergy==0.0.5'] def setup_platform(hass, config, add_devices, discovery_info=None): @@ -45,6 +46,13 @@ def setup_platform(hass, config, add_devices, discovery_info=None): gas_secret ) + def stop_loopenergy(event): + """Shutdown loopenergy thread on exit.""" + _LOGGER.info("Shutting down loopenergy.") + controller.terminate() + + hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_loopenergy) + sensors = [LoopEnergyElec(controller)] if gas_serial: diff --git a/homeassistant/components/vera.py b/homeassistant/components/vera.py index ed008a9da75..25dc1830615 100644 --- a/homeassistant/components/vera.py +++ b/homeassistant/components/vera.py @@ -16,7 +16,7 @@ from homeassistant.const import ( from homeassistant.helpers.entity import Entity from homeassistant.loader import get_component -REQUIREMENTS = ['pyvera==0.2.8'] +REQUIREMENTS = ['pyvera==0.2.10'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/wemo.py b/homeassistant/components/wemo.py index 4e942666645..f97567bc2b8 100644 --- a/homeassistant/components/wemo.py +++ b/homeassistant/components/wemo.py @@ -9,7 +9,7 @@ import logging from homeassistant.components import discovery from homeassistant.const import EVENT_HOMEASSISTANT_STOP -REQUIREMENTS = ['pywemo==0.3.23'] +REQUIREMENTS = ['pywemo==0.3.24'] DOMAIN = 'wemo' DISCOVER_LIGHTS = 'wemo.light' diff --git a/requirements_all.txt b/requirements_all.txt index 5e3721c53ac..0733e8e0385 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -183,7 +183,7 @@ pyfttt==0.3 pyicloud==0.7.2 # homeassistant.components.sensor.loopenergy -pyloopenergy==0.0.4 +pyloopenergy==0.0.5 # homeassistant.components.device_tracker.netgear pynetgear==0.3.2 @@ -235,10 +235,10 @@ python-wink==0.6.4 pyuserinput==0.1.9 # homeassistant.components.vera -pyvera==0.2.8 +pyvera==0.2.10 # homeassistant.components.wemo -pywemo==0.3.23 +pywemo==0.3.24 # homeassistant.components.thermostat.radiotherm radiotherm==1.2