Hello
The device is successfully added to Home Assistant via integration but neâŚver actually gets added to the system.
In the logs I see this:
`Logger: homeassistant.components.vacuum
Source: custom_components/xiaomi_miot_raw/__init__.py:1070
Integration: Vacuum (documentation, issues)
First occurred: 2:33:52 PM (2 occurrences)
Last logged: 2:39:11 PM
Error while setting up xiaomi_miot_raw platform for vacuum
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/xiaomi_miot_raw/vacuum.py", line 97, in async_setup_entry
await async_setup_platform(hass, config, async_add_entities)
File "/config/custom_components/xiaomi_miot_raw/vacuum.py", line 86, in async_setup_platform
await async_generic_setup_platform(
File "/config/custom_components/xiaomi_miot_raw/__init__.py", line 1070, in async_generic_setup_platform
device_info.hardware_version,
File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 88, in hardware_version
if self.data["hw_ver"] is not None:
KeyError: 'hw_ver'`
These are the component mappings that it finds when device is added:
{"vacuum":{"status":{"siid":2,"piid":1},"fault":{"siid":2,"piid":2},"wdr_mode":{"siid":2,"piid":11},"door_state":{"siid":2,"piid":12},"contact_state":{"siid":2,"piid":16},"stream_address":{"siid":2,"piid":14},"mute":{"siid":2,"piid":17},"sweep_type":{"siid":2,"piid":4},"mode":{"siid":2,"piid":19}},"a_l":{"vacuum_start_sweep":{"siid":2,"aiid":1},"vacuum_stop_sweeping":{"siid":2,"aiid":2},"vacuum_pause":{"siid":2,"aiid":3},"vacuum_start_charge":{"siid":2,"aiid":4},"vacuum_stop_massage":{"siid":2,"aiid":5},"vacuum_start_mop":{"siid":2,"aiid":6},"vacuum_start_only_sweep":{"siid":2,"aiid":7},"vacuum_start_sweep_mop":{"siid":2,"aiid":8},"viomi_vacuum_reset_map":{"siid":4,"aiid":7},"viomi_vacuum_set_calibration":{"siid":4,"aiid":10},"viomi_vacuum_reset_consumable":{"siid":4,"aiid":11},"viomi_vacuum_set_room_clean":{"siid":4,"aiid":13},"order_del":{"siid":5,"aiid":2},"order_get":{"siid":5,"aiid":3},"point_zone_start_point_clean":{"siid":6,"aiid":1},"point_zone_pause_point_clean":{"siid":6,"aiid":2},"point_zone_start_zone_clean":{"siid":6,"aiid":5},"point_zone_pause_zone_clean":{"siid":6,"aiid":6},"map_upload_by_maptype":{"siid":7,"aiid":1},"map_upload_by_mapid":{"siid":7,"aiid":2},"map_set_cur_map":{"siid":7,"aiid":3},"map_del_map":{"siid":7,"aiid":5},"map_rename_map":{"siid":7,"aiid":7},"map_arrange_room":{"siid":7,"aiid":8},"map_split_room":{"siid":7,"aiid":9},"map_rename_room":{"siid":7,"aiid":10},"map_get_map_list":{"siid":7,"aiid":11},"map_get_cleaning_path":{"siid":7,"aiid":12},"map_set_new_map":{"siid":7,"aiid":13},"map_deal_new_map":{"siid":7,"aiid":14},"voice_find_device":{"siid":8,"aiid":2},"voice_download_voice":{"siid":8,"aiid":3},"voice_get_downloadstatus":{"siid":8,"aiid":4}}}
{"vacuum":{"fault":{"No Error":0,"Low Battery Find Charge":1,"Low Bat Need Poweroff":2,"Wheel Trap":3,"Collision Error":4,"Tile Do Task":5,"Lidar Point Err":6,"Front Wall Err":7,"Along Wall Err":8,"Mid Brush Err":9,"Side Brush Err":10,"Fan Err":11,"Lidar Cover":12,"Garbage Full":13,"Garbage Out":18,"Garbage Full Out":15,"Trapped":16,"Pick Up":17,"Cannot Arrive":20,"Start From Forbid":21,"Drop":22,"Kit Water Pump":23,"Find Charge Failed":24,"No Mop Clean":25,"Low Battery Cant Clean":26},"mode":{"Silent":0,"Basic":1,"Medium":2,"Strong":3},"status":{"Sleep":0,"Idle":1,"Paused":2,"Go Charging":3,"Charging":4,"Sweeping":5,"Sweeping and Mopping":6,"Mopping":7},"wdr_mode":{"access":7,"format":"uint8","unit":null,"value_list":{"0":0,"1":1,"2":2}},"door_state":{"access":5,"format":"uint8","unit":null,"value_list":{"0":0,"1":1,"2":2,"3":3}},"contact_state":{"access":5,"format":"uint16","unit":null,"value_range":[0,1200,1]},"stream_address":{"access":0,"format":"string","unit":null},"mute":{"access":7,"format":"uint8","unit":null,"value_range":[0,10,1]},"sweep_type":{"access":7,"format":"uint8","unit":null,"value_list":{"Total":0,"Wall":2,"Zone":3,"Point":4,"Control":5}},"main":true}}
I managed to get it added by commending the lines that were relating to hardware_version.
Now I have a problem that it does not return back to dock when command is issued