Upgrade python-mystrom to 0.4.4 (#14889)
This commit is contained in:
1 parent
ce0ca7ff90
commit
703b4354e0
3 files changed
+14
-17
No files matched your search
@@ -13,9 +13,9 @@ from homeassistant.components.light import (
|
||||
Light, PLATFORM_SCHEMA, ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS,
|
||||
SUPPORT_EFFECT, ATTR_EFFECT, SUPPORT_FLASH, SUPPORT_COLOR,
|
||||
ATTR_HS_COLOR)
|
||||
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME, STATE_UNKNOWN
|
||||
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
|
||||
|
||||
REQUIREMENTS = ['python-mystrom==0.4.2']
|
||||
REQUIREMENTS = ['python-mystrom==0.4.4']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -54,9 +54,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
try:
|
||||
if bulb.get_status()['type'] != 'rgblamp':
|
||||
_LOGGER.error("Device %s (%s) is not a myStrom bulb", host, mac)
|
||||
return False
|
||||
return
|
||||
except MyStromConnectionError:
|
||||
_LOGGER.warning("myStrom bulb not online")
|
||||
_LOGGER.warning("No route to device: %s", host)
|
||||
|
||||
add_devices([MyStromLight(bulb, name)], True)
|
||||
|
||||
@@ -107,7 +107,7 @@ class MyStromLight(Light):
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return true if light is on."""
|
||||
return self._state['on'] if self._state is not None else STATE_UNKNOWN
|
||||
return self._state['on'] if self._state is not None else None
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn on the light."""
|
||||
@@ -136,7 +136,7 @@ class MyStromLight(Light):
|
||||
if effect == EFFECT_RAINBOW:
|
||||
self._bulb.set_rainbow(30)
|
||||
except MyStromConnectionError:
|
||||
_LOGGER.warning("myStrom bulb not online")
|
||||
_LOGGER.warning("No route to device")
|
||||
|
||||
def turn_off(self, **kwargs):
|
||||
"""Turn off the bulb."""
|
||||
@@ -163,5 +163,5 @@ class MyStromLight(Light):
|
||||
|
||||
self._available = True
|
||||
except MyStromConnectionError:
|
||||
_LOGGER.warning("myStrom bulb not online")
|
||||
_LOGGER.warning("No route to device")
|
||||
self._available = False
|
||||
Reference in new issue
Block a user