0.62.1 broke Xiaomi IR Switch and Mi Air Purifier Fan

I cannot get it to work…

Not initializing switch.chuangmi_ir because could not install dependency python-miio>=0.3.5

Error Log:

2018-02-06 13:36:12 INFO (SyncWorker_6) [homeassistant.util.package] Attempting install of python-miio>=0.3.5
2018-02-06 13:37:01 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package python-miio>=0.3.5: Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-gf7dhwwn/cryptography/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-n8pb6acv-record/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-gf7dhwwn/cryptography/
2018-02-06 13:37:01 ERROR (MainThread) [homeassistant.setup] Not initializing switch.chuangmi_ir because could not install dependency python-miio>=0.3.5
2018-02-06 13:37:01 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.chuangmi_ir: Could not install all requirements.
2018-02-06 13:37:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

  • switch.chuangmi_ir
    Please check your config., notification_id=invalid_config, service_call_id=1965195152-6>
    2018-02-06 13:37:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:
  • switch.chuangmi_ir
    Please check your config., notification_id=invalid_config, service_call_id=1965195152-7>
    2018-02-06 13:37:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:
  • switch.chuangmi_ir
    Please check your config. @ 2018-02-06T13:37:01.610137+00:00>>
    2018-02-06 13:37:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1965195152-6>
    2018-02-06 13:37:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1965195152-7>
    2018-02-06 13:37:03 INFO (MainThread) [homeassistant.components.switch] Setting up switch.xiaomi_miio
    2018-02-06 13:37:03 INFO (MainThread) [homeassistant.components.switch.xiaomi_miio] Initializing with host 192.168.1.144 (token d7007…)
    2018-02-06 13:37:03 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform xiaomi_miio
    Traceback (most recent call last):
    File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 189, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
    File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
    return fut.result()
    File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
    raise self._exception
    File “/usr/lib/python3.6/asyncio/tasks.py”, line 180, in _step
    result = coro.send(None)
    File “/usr/lib/python3.6/asyncio/coroutines.py”, line 210, in coro
    res = func(*args, **kw)
    File “/usr/lib/python3.6/site-packages/homeassistant/components/switch/xiaomi_miio.py”, line 52, in async_setup_platform
    device_info = plug.info()
    File “/usr/lib/python3.6/site-packages/miio/device.py”, line 271, in info
    return DeviceInfo(self.send(“miIO.info”, ))
    File “/usr/lib/python3.6/site-packages/miio/device.py”, line 216, in send
    m = Message.build(msg, ctx)
    TypeError: build() takes 2 positional arguments but 3 were given
    2018-02-06 13:37:04 INFO (SyncWorker_7) [homeassistant.util.package] Attempting install of python-miio>=0.3.5
    2018-02-06 13:37:51 ERROR (SyncWorker_7) [homeassistant.util.package] Unable to install package python-miio>=0.3.5: Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=‘/tmp/pip-build-2kgnovby/cryptography/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-_l_19wk9-record/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-2kgnovby/cryptography/
    2018-02-06 13:37:51 ERROR (MainThread) [homeassistant.setup] Not initializing switch.chuangmi_ir because could not install dependency python-miio>=0.3.5
    2018-02-06 13:37:51 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.chuangmi_ir: Could not install all requirements.
    2018-02-06 13:37:51 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:
  • switch.chuangmi_ir
    Please check your config., notification_id=invalid_config, service_call_id=1965195152-8>
    2018-02-06 13:37:51 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:
  • switch.chuangmi_ir
    Please check your config., notification_id=invalid_config, service_call_id=1965195152-9>
    2018-02-06 13:37:51 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1965195152-8>
    2018-02-06 13:37:51 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1965195152-9>
    core-ssh:~# hassio ha logs

Error decoding json invalid character ‘\x1b’ looking for beginning of value: 2018-02-06 13:39:47 INFO (MainThread) [homeassistant.loader] Loaded remote from homeassistant.components.remote

Does anybody on Hass.io 0.62.1 managed to have the Xiaomi IR and Mi Air Purifier 2 working?

Nop, you sadly have to wait for 0.63, it has been fixed in the dev branch.