lazcad / homeassistant

Home Assistant Development
249 stars 83 forks source link

Error while setting up platform xiaomi #73

Open Devby opened 7 years ago

Devby commented 7 years ago

Please help!

2017-07-27 12:02:19 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform xiaomi Traceback (most recent call last): File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=self.hass.loop) File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for return fut.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/switch/xiaomi.py", line 31, in setup_platform devices.append(XiaomiGenericSwitch(device, "Plug", 'status', gateway)) File "/home/homeassistant/.homeassistant/custom_components/switch/xiaomi.py", line 52, in init XiaomiDevice.init(self, device, name, xiaomi_hub) File "/home/homeassistant/.homeassistant/custom_components/xiaomi.py", line 485, in init self.parse_data(device['data']) File "/home/homeassistant/.homeassistant/custom_components/switch/xiaomi.py", line 96, in parse_data self._load_power = int(data[LOAD_POWER]) ValueError: invalid literal for int() with base 10: '0.00'

pixeldublu commented 7 years ago

I also have this issue... had it before but usually one/two restarts solved it... now after latest homeassistant update it does not work at all...

lobmarib commented 7 years ago

I can't configure my gateway either

pixeldublu commented 7 years ago

Managed to fix. Just delete the custom integration. Latest homeassistant has xiaomi bundled in :) And checkout the samples since there are some changes in configuration.

lobmarib commented 7 years ago

Can you please post here your configuration ? Thanks in advance

lobmarib commented 7 years ago

I did what you said and now works like a charm. Thanks

marcecastro commented 7 years ago

Hi!

I'm struggling with the same issue. What's the custom integration we need to delete? Thanks!

Edit: I removed that custom integration from my configuration.yaml file. I see the Xiaomi devices in HA but I still get the error.