-
Notifications
You must be signed in to change notification settings - Fork 231
Description
Hi, it was working flawlessly before the update. I'm not sure if it's the homeassistant update or the add-on update that causes the error.
Home assistant
Version
core-2021.9.3
Xiaomi MIoT 1.2.4
The device and entity are missing.
Here is the debug log:
2021-09-07 08:48:58 INFO (MainThread) [custom_components.xiaomi_miot_raw] Initializing Curtain 1 with host 192.168.1.24 (token [masked_token]...)
2021-09-07 08:48:58 DEBUG (MainThread) [miio.miioprotocol] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x07\xb5^\xad\x00\x00n$' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('07b55ead')
ts = 1970-01-01 07:49:56
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2021-09-07 08:48:58 DEBUG (MainThread) [miio.miioprotocol] Discovered 07b55ead with ts: 1970-01-01 07:49:56, token: b'ffffffffffffffffffffffffffffffff'
2021-09-07 08:48:58 DEBUG (MainThread) [miio.miioprotocol] 192.168.1.24:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
2021-09-07 08:48:58 DEBUG (MainThread) [miio.miioprotocol] 192.168.1.24:54321 (ts: 1970-01-01 07:49:56, id: 1) << {'id': 1, 'result': {'life': 28196, 'uid': [masked_uid], 'model': '090615.curtain.sidt82', 'token': '[masked_token]', 'ipflag': 1, 'fw_ver': '2.1.3', 'mcu_fw_ver': '0007', 'miio_ver': '0.0.9', 'hw_ver': 'esp8266', 'mmfree': 22132, 'mac': '[masked_mac]', 'wifi_fw_ver': '8903c22', 'ap': {'ssid': '[masked_ssid]', 'bssid': '[masked_bssid]', 'rssi': -41, 'primary': 1}, 'netif': {'localIp': '192.168.1.24', 'mask': '255.255.255.0', 'gw': '192.168.1.1'}}, 'exe_time': 40}
2021-09-07 08:48:58 INFO (MainThread) [custom_components.xiaomi_miot_raw] 090615.curtain.sidt82 2.1.3 esp8266 detected
2021-09-07 08:48:58 INFO (MainThread) [custom_components.xiaomi_miot_raw] curtain is the main device of 192.168.1.24.
2021-09-07 08:48:58 INFO (MainThread) [custom_components.xiaomi_miot_raw.basic_dev_class] Curtain 1 is updating from cloud.
2021-09-07 08:48:59 INFO (MainThread) [custom_components.xiaomi_miot_raw.deps.xiaomi_cloud_new] Response of /miotspec/prop/get from cloud: {'code': 0, 'message': '', 'result': [{'did': '[masked_did]', 'siid': 2, 'piid': 1, 'value': 1, 'code': 0, 'updateTime': 1630952193}, {'did': '[masked_did]', 'siid': 2, 'piid': 2, 'value': 100, 'code': 0, 'updateTime': 1630952193}, {'did': '[masked_did]', 'siid': 2, 'piid': 2, 'value': 100, 'code': 0, 'updateTime': 1630952193}]}
2021-09-07 08:48:59 ERROR (MainThread) [homeassistant.components.cover] xiaomi_miot_raw: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 633, in async_device_update
await task
File "/config/custom_components/xiaomi_miot_raw/cover.py", line 210, in _async_update
await super().async_update()
File "/config/custom_components/xiaomi_miot_raw/basic_dev_class.py", line 511, in async_update
self._handle_platform_specific_attrs()
File "/config/custom_components/xiaomi_miot_raw/cover.py", line 197, in _handle_platform_specific_attrs
if 'value_range' in self._ctrl_params['current_position'] and self._current_position is not None:
KeyError: 'current_position'
Thanks!
Luis