From 06aded1a4db86043d4f49b30dab87879bd816fba Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Mar 2018 13:09:01 +0200 Subject: [PATCH] Upgrade python-mystrom to 0.4.2 (#13485) --- homeassistant/components/light/mystrom.py | 4 ++-- homeassistant/components/switch/mystrom.py | 6 +++--- requirements_all.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/light/mystrom.py b/homeassistant/components/light/mystrom.py index d9312e6aadc..8d7fb807c6d 100644 --- a/homeassistant/components/light/mystrom.py +++ b/homeassistant/components/light/mystrom.py @@ -15,7 +15,7 @@ from homeassistant.components.light import ( ATTR_HS_COLOR) from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME, STATE_UNKNOWN -REQUIREMENTS = ['python-mystrom==0.3.8'] +REQUIREMENTS = ['python-mystrom==0.4.2'] _LOGGER = logging.getLogger(__name__) @@ -43,7 +43,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): """Set up the myStrom Light platform.""" - from pymystrom import MyStromBulb + from pymystrom.bulb import MyStromBulb from pymystrom.exceptions import MyStromConnectionError host = config.get(CONF_HOST) diff --git a/homeassistant/components/switch/mystrom.py b/homeassistant/components/switch/mystrom.py index e813da43dfa..0a87d41d2fe 100644 --- a/homeassistant/components/switch/mystrom.py +++ b/homeassistant/components/switch/mystrom.py @@ -12,7 +12,7 @@ from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) from homeassistant.const import (CONF_NAME, CONF_HOST) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['python-mystrom==0.3.8'] +REQUIREMENTS = ['python-mystrom==0.4.2'] DEFAULT_NAME = 'myStrom Switch' @@ -26,7 +26,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): """Find and return myStrom switch.""" - from pymystrom import MyStromPlug, exceptions + from pymystrom.switch import MyStromPlug, exceptions name = config.get(CONF_NAME) host = config.get(CONF_HOST) @@ -45,7 +45,7 @@ class MyStromSwitch(SwitchDevice): def __init__(self, name, resource): """Initialize the myStrom switch.""" - from pymystrom import MyStromPlug + from pymystrom.switch import MyStromPlug self._name = name self._resource = resource diff --git a/requirements_all.txt b/requirements_all.txt index e8baacf7d2e..026892099f1 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -955,7 +955,7 @@ python-mpd2==0.5.5 # homeassistant.components.light.mystrom # homeassistant.components.switch.mystrom -python-mystrom==0.3.8 +python-mystrom==0.4.2 # homeassistant.components.nest python-nest==3.7.0