home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.63k stars 30.78k forks source link

Tplink Switch and bulb support breaking on 0.52 update #9153

Closed sriramsv closed 7 years ago

sriramsv commented 7 years ago

Home Assistant release (hass --version): 0.52

Python release (python3 --version): python 3.4.2

Component/platform: tplink smart switch and non-color bulbs Light bulb: LB100 Switch: HS100 Description of problem: The support for tplink bulbs and switches are broken after 0.52 update.

Expected:

Problem-relevant configuration.yaml entries and steps to reproduce:

 light:
  - platform: tplink
    name: bedroom_light
    host: 192.168.1.3
2. switch:  
- platform: tplink
  host: 192.168.1.26
  name: fan

Traceback (if applicable):

switch

ug 26 21:35:13 hass hass[31123]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/switch/tplink.py", line 73, in turn_on
Aug 26 21:35:13 hass hass[31123]: self.smartplug.turn_on()
Aug 26 21:35:13 hass hass[31123]: File "/srv/homeassistant/lib/python3.4/site-packages/pyHS100/pyHS100.py", line 724, in turn_on
Aug 26 21:35:13 hass hass[31123]: self._query_helper("system", "set_relay_state", {"state": 1})
Aug 26 21:35:13 hass hass[31123]: File "/srv/homeassistant/lib/python3.4/site-packages/pyHS100/pyHS100.py", line 74, in _query_helper
Aug 26 21:35:13 hass hass[31123]: raise_from(SmartPlugException(), ex)
Aug 26 21:35:13 hass hass[31123]: File "/srv/homeassistant/lib/python3.4/site-packages/future/utils/__init__.py", line 398, in raise_from
Aug 26 21:35:13 hass hass[31123]: exec(execstr, myglobals, mylocals)
Aug 26 21:35:13 hass hass[31123]: File "<string>", line 1, in <module>

bulb:

Aug 26 21:33:34 hass hass[31123]: value = getattr(self, name)
Aug 26 21:33:34 hass hass[31123]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/tplink.py", line 146, in supported_features
Aug 26 21:33:34 hass hass[31123]: if self.smartbulb.is_color:
Aug 26 21:33:34 hass hass[31123]: File "/srv/homeassistant/lib/python3.4/site-packages/pyHS100/pyHS100.py", line 441, in is_color
Aug 26 21:33:34 hass hass[31123]: return bool(self.sys_info['is_color'])
Aug 26 21:33:34 hass hass[31123]: KeyError: 'is_color'
sriramsv commented 7 years ago

Looked like the ip addresses of my devices changed and broke the settings in homeassistant

Closing it