gvigroux / hon

Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters
MIT License
118 stars 45 forks source link

Error while setting up hon platform for sensor #30

Closed Anzic23 closed 1 year ago

Anzic23 commented 1 year ago

I have two air conditioners, they worked without problems for about a month, but the last few days one of them stopped working. The error code is the following: Logger: homeassistant.components.sensor Source: custom_components/hon/cooler.py:27 Integration: Сенсор (documentation, issues) First occurred: 13:43:08 (1 occurrences) Last logged: 13:43:08

Error while setting up hon platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/hon/sensor.py", line 121, in async_setup_entry coordinator = HonCoolerCoordinator(hass, hon, appliance) File "/config/custom_components/hon/cooler.py", line 27, in init self._mac = appliance["macAddress"] KeyError: 'macAddress'

gvigroux commented 1 year ago

I tried to create a new account and there is no more virtual device. In any case, I've added a check, it should not crash anymore.