From fb297981aff6ab565084205aa938137453f4c854 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 24 Apr 2017 21:57:27 -0700 Subject: [PATCH] Upgrade pytradfri to 1.1 (#7290) --- homeassistant/components/light/tradfri.py | 5 +++-- homeassistant/components/tradfri.py | 2 +- requirements_all.txt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/light/tradfri.py b/homeassistant/components/light/tradfri.py index 9c0284c22f6..ca1d5a38330 100644 --- a/homeassistant/components/light/tradfri.py +++ b/homeassistant/components/light/tradfri.py @@ -129,7 +129,8 @@ class Tradfri(Light): """Fetch new state data for this light.""" self._light.update() - # Handle Hue lights paired with the gatway - if self._light_data.hex_color is not None: + # Handle Hue lights paired with the gateway + # hex_color is 0 when bulb is unreachable + if self._light_data.hex_color not in (None, '0'): self._rgb_color = color_util.rgb_hex_to_rgb_list( self._light_data.hex_color) diff --git a/homeassistant/components/tradfri.py b/homeassistant/components/tradfri.py index 098b1788742..3fd51a68db0 100644 --- a/homeassistant/components/tradfri.py +++ b/homeassistant/components/tradfri.py @@ -21,7 +21,7 @@ DOMAIN = 'tradfri' CONFIG_FILE = 'tradfri.conf' KEY_CONFIG = 'tradfri_configuring' KEY_GATEWAY = 'tradfri_gateway' -REQUIREMENTS = ['pytradfri==1.0'] +REQUIREMENTS = ['pytradfri==1.1'] CONFIG_SCHEMA = vol.Schema({ DOMAIN: vol.Schema({ diff --git a/requirements_all.txt b/requirements_all.txt index 0f73982eac4..b13ee19dc79 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -664,7 +664,7 @@ python-wink==1.2.3 pytrackr==0.0.5 # homeassistant.components.tradfri -pytradfri==1.0 +pytradfri==1.1 # homeassistant.components.device_tracker.unifi pyunifi==2.0