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

Fixed sensors not showing up if applicance has total_wash_cycles #68

Closed breuhan closed 1 year ago

breuhan commented 1 year ago

My Washdryer HWD80-B14979U1 had no sensors before, but works with this patch perfectly fine.

Error while setting up hon platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/hon/sensor.py", line 123, in async_setup_entry appliances.extend([HonBaseTotalWashCycle(hass, coordinator, entry, appliance)]) File "/config/custom_components/hon/sensor.py", line 500, in init super().init(hass, entry, coordinator, appliance) File "/config/custom_components/hon/base.py", line 137, in init self._coordinator.addKey(key) AttributeError: 'HomeAssistant' object has no attribute 'addKey'

gvigroux commented 1 year ago

Thanks for the catch :)