Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions homeassistant/components/light/xiaomi_philipslight.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
})

REQUIREMENTS = ['python-mirobo==0.1.3']
REQUIREMENTS = ['python-mirobo==0.2.0']

# The light does not accept cct values < 1
CCT_MIN = 1
Expand Down Expand Up @@ -163,7 +163,7 @@ def async_turn_on(self, **kwargs):

result = yield from self._try_command(
"Setting brightness failed: %s",
self._light.set_bright, percent_brightness)
self._light.set_brightness, percent_brightness)

if result:
self._brightness = brightness
Expand All @@ -181,7 +181,7 @@ def async_turn_on(self, **kwargs):

result = yield from self._try_command(
"Setting color temperature failed: %s cct",
self._light.set_cct, percent_color_temp)
self._light.set_color_temperature, percent_color_temp)

if result:
self._color_temp = color_temp
Expand All @@ -207,13 +207,13 @@ def async_update(self):
from mirobo import DeviceException
try:
state = yield from self.hass.async_add_job(self._light.status)
_LOGGER.debug("Got new state: %s", state.data)
_LOGGER.debug("Got new state: %s", state)

self._state = state.is_on
self._brightness = int(255 * 0.01 * state.bright)
self._color_temp = self.translate(state.cct, CCT_MIN, CCT_MAX,
self.max_mireds,
self.min_mireds)
self._brightness = int(255 * 0.01 * state.brightness)
self._color_temp = self.translate(state.color_temperature,
CCT_MIN, CCT_MAX,
self.max_mireds, self.min_mireds)

except DeviceException as ex:
_LOGGER.error("Got exception while fetching the state: %s", ex)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/vacuum/xiaomi.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_TOKEN, STATE_OFF, STATE_ON)
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['python-mirobo==0.1.3']
REQUIREMENTS = ['python-mirobo==0.2.0']

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ python-juicenet==0.0.5

# homeassistant.components.light.xiaomi_philipslight
# homeassistant.components.vacuum.xiaomi
python-mirobo==0.1.3
python-mirobo==0.2.0

# homeassistant.components.media_player.mpd
python-mpd2==0.5.5
Expand Down