diff --git a/homeassistant/components/insteon_local.py b/homeassistant/components/insteon_local.py index c2007dd51f3..cf93bc97e57 100644 --- a/homeassistant/components/insteon_local.py +++ b/homeassistant/components/insteon_local.py @@ -13,7 +13,7 @@ from homeassistant.const import ( CONF_PASSWORD, CONF_USERNAME, CONF_HOST, CONF_PORT, CONF_TIMEOUT) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['insteonlocal==0.39'] +REQUIREMENTS = ['insteonlocal==0.48'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/light/insteon_local.py b/homeassistant/components/light/insteon_local.py index c51c7d9d839..865458eae24 100644 --- a/homeassistant/components/light/insteon_local.py +++ b/homeassistant/components/light/insteon_local.py @@ -152,6 +152,10 @@ class InsteonLocalDimmerDevice(Light): def update(self): """Update state of the light.""" resp = self.node.status(0) + + while 'error' in resp and resp['error'] is True: + resp = self.node.status(0) + if 'cmd2' in resp: self._value = int(resp['cmd2'], 16) diff --git a/homeassistant/components/switch/insteon_local.py b/homeassistant/components/switch/insteon_local.py index 6935ad21abe..2017ad96a47 100644 --- a/homeassistant/components/switch/insteon_local.py +++ b/homeassistant/components/switch/insteon_local.py @@ -143,6 +143,10 @@ class InsteonLocalSwitchDevice(SwitchDevice): def update(self): """Get the updated status of the switch.""" resp = self.node.status(0) + + while 'error' in resp and resp['error'] is True: + resp = self.node.status(0) + if 'cmd2' in resp: self._state = int(resp['cmd2'], 16) > 0 diff --git a/requirements_all.txt b/requirements_all.txt index eca5583fad7..5991de37372 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -310,7 +310,7 @@ influxdb==3.0.0 insteon_hub==0.4.5 # homeassistant.components.insteon_local -insteonlocal==0.39 +insteonlocal==0.48 # homeassistant.components.insteon_plm insteonplm==0.7.4