Fix getting state from iglo (#12685)

pull/12742/head
Jesse Hills 2018-02-27 20:07:39 +13:00 committed by Paulus Schoutsen
parent 9e8340432c
commit 948ef7523e
2 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT
import homeassistant.helpers.config_validation as cv
import homeassistant.util.color as color_util
REQUIREMENTS = ['iglo==1.2.5']
REQUIREMENTS = ['iglo==1.2.6']
_LOGGER = logging.getLogger(__name__)
@ -56,13 +56,13 @@ class IGloLamp(Light):
@property
def brightness(self):
"""Return the brightness of this light between 0..255."""
return int((self._lamp.state['brightness'] / 200.0) * 255)
return int((self._lamp.state()['brightness'] / 200.0) * 255)
@property
def color_temp(self):
"""Return the color temperature."""
return color_util.color_temperature_kelvin_to_mired(
self._lamp.state['white'])
self._lamp.state()['white'])
@property
def min_mireds(self):
@ -79,12 +79,12 @@ class IGloLamp(Light):
@property
def rgb_color(self):
"""Return the RGB value."""
return self._lamp.state['rgb']
return self._lamp.state()['rgb']
@property
def effect(self):
"""Return the current effect."""
return self._lamp.state['effect']
return self._lamp.state()['effect']
@property
def effect_list(self):
@ -100,7 +100,7 @@ class IGloLamp(Light):
@property
def is_on(self):
"""Return true if light is on."""
return self._lamp.state['on']
return self._lamp.state()['on']
def turn_on(self, **kwargs):
"""Turn the light on."""

View File

@ -400,7 +400,7 @@ https://github.com/wokar/pylgnetcast/archive/v0.2.0.zip#pylgnetcast==0.2.0
# i2csense==0.0.4
# homeassistant.components.light.iglo
iglo==1.2.5
iglo==1.2.6
# homeassistant.components.ihc
ihcsdk==2.1.1