Home-Assistant-custom-components-Xiaomi-Vacuum-Map-Camera icon indicating copy to clipboard operation
Home-Assistant-custom-components-Xiaomi-Vacuum-Map-Camera copied to clipboard

Error after HA start

Open panoskpv opened this issue 3 years ago • 10 comments

I have the below error after HA start and although a camera entity is created, there are no data even after the first start.

Error adding entities for domain camera with platform xiaomi_vacuum_map
Error while setting up xiaomi_vacuum_map platform for camera

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in _async_write_ha_state extra_state_attributes = self.extra_state_attributes File "/config/custom_components/xiaomi_vacuum_map/camera.py", line 76, in extra_state_attributes "vacuum_status": self.hass.states.get(self._vacuum_entity).state AttributeError: 'NoneType' object has no attribute 'state'

I just want to use your great HA card with a valetudo installed roborock v1. Thank you.

panoskpv avatar Jan 24 '22 16:01 panoskpv

Have you used this integration before or is it a first setup?

PiotrMachowski avatar Jan 24 '22 16:01 PiotrMachowski

Thank you for the swift response. I have manually added it in HA few months ago and re-installed it today via HACS. Files in relevant folder (camera.py etc) are the newest ones

panoskpv avatar Jan 24 '22 16:01 panoskpv

Ok, so it was working before?

PiotrMachowski avatar Jan 24 '22 17:01 PiotrMachowski

No. But I think I had problems with SSH to the vacuum. But I don't remember errors in logs. Any idea. Please note that I have HA os in case this changes anything

panoskpv avatar Jan 24 '22 17:01 panoskpv

Well, to be honest I don't think this custom component is a good way to get a map from your vacuum... I can't believe it's not Valetudo is probably a better choice

PiotrMachowski avatar Jan 24 '22 17:01 PiotrMachowski

The problem is the calibration. In this model map is regenerated every time vacuum starts and the rotation of the map is not the same.

panoskpv avatar Jan 24 '22 17:01 panoskpv

Ok, have you provided a correct vacuum entity id?

PiotrMachowski avatar Jan 24 '22 17:01 PiotrMachowski

I tried both valetudo and xiaomi miio intities with the same result

panoskpv avatar Jan 24 '22 18:01 panoskpv

Ok, I will have to try setting up this integration again. I haven't used it for ages

PiotrMachowski avatar Jan 24 '22 18:01 PiotrMachowski

Thank you for the support

panoskpv avatar Jan 24 '22 18:01 panoskpv