HASwitchPlate / openHASP-custom-component

Home Assistant custom component for openHASP
https://www.openhasp.com
MIT License
49 stars 9 forks source link

Integration cannot be setup in HomeAssistant 2021.12 #83

Closed wolfmare closed 2 years ago

wolfmare commented 2 years ago

Version of the custom_component

0.6.3

Describe the bug

Integration doesn't start since HomeAssistant was upgraded to version 2021.12 (see error log). Removing integration and rebooting HA core results in HASP discovery, but integration can't be added with the same error. Removing and re-adding integration gives configuration flow error.

Debug log


Logger: homeassistant.config_entries
Source: custom_components/openhasp/__init__.py:409 
Integration: openHASP (documentation, issues) 
First occurred: 16:09:56 (1 occurrences) 
Last logged: 16:09:56

Error setting up entry plate for openhasp
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/openhasp/__init__.py", line 251, in async_setup_entry
    await component.async_add_entities([plate_entity])
  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 747, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/openhasp/__init__.py", line 409, in async_added_to_hass
    self.hass.components.mqtt.async_publish(
TypeError: async_publish() missing 1 required positional argument: 'payload'
fvanroie commented 2 years ago

Please try upgrading to the newly released version 0.6.4 of the custom component.

wolfmare commented 2 years ago

Thank you, it worked.