The following Components and platforms could not be set up: xiaomi_aqara

Hello everyone,

Since I upgraded my HA to the build “0.73.2” the Xiaomi Gateway components (Xiaomi Gateway (Aqara) - Home Assistant) stopped working.

In the log I have the following:

2018-07-18 20:52:59 ERROR (MainThread) [homeassistant.setup] Error during setup of component 
xiaomi_aqara
Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 146, in 
_async_setup_component
   component.setup, hass, processed_config)  # type: ignore
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
 File "/usr/local/lib/python3.6/site-packages/homeassistant/components/xiaomi_aqara.py", line 125, in setup
    from xiaomi_gateway import XiaomiGatewayDiscovery
 File "/usr/local/lib/python3.6/site-packages/xiaomi_gateway/__init__.py", line 9, in <module>
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
 File "/usr/local/lib/python3.6/site-packages/cryptography/__init__.py", line 1
  data value
 IndentationError: unexpected indent
^

In Dashboard I have the following:
“The following Components and platforms could not be set up: xiaomi_aqara”

My configuration it’s the following:

xiaomi_aqara:
discovery_retry: 5
gateways:
- key: XXXXXXXXXXXXX

I have the same issue but when upgrade gateway firmware. Plugin version 2.57.5

Blockquote
No gateway discovered
20:43 components/xiaomi_aqara.py (ERROR)

Resolved my problem!

Solution:
-> Opened the page hass.io components
-> Clicked on Snapshots
-> Created a full backup
-> Restore the backup with “WIPE & restore”
-> Problem Solved

I tried the "wipe and restore " and I am still getting the error. Please help!