Closed johnnykang closed 2 years ago
I add myself to the report:
Logger: homeassistant.components.climate Source: custom_components/tasmota_irhvac/climate.py:655 Integration: Termostato (documentation, issues) First occurred: 17:31:06 (3 occurrences) Last logged: 17:31:06
Error adding entities for domain climate with platform tasmota_irhvac Error while setting up tasmota_irhvac platform for climate 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 614, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 782, in add_to_platform_finish await self.async_added_to_hass() File "/config/custom_components/tasmota_irhvac/climate.py", line 478, in async_added_to_hass await self._subscribe_topics() File "/config/custom_components/tasmota_irhvac/climate.py", line 655, in _subscribe_topics self._sub_state = await mqtt.subscription.async_subscribe_topics( TypeError: async_subscribe_topics() takes 2 positional arguments but 3 were given
@johnnykang Can you confirm, that changing await async_subscribe_topics
to async_prepare_subscribe_topics
fixes the problem?
For me, at line 655, changing from:
self._sub_state = await mqtt.subscription.async_subscribe_topics
to
self._sub_state = mqtt.subscription.async_prepare_subscribe_topics
fixes the problem.
cheers.
The problem is fixed and a new update is available in HACS (v2022.03.04). The suggestions above only hides the error in the logs, but does not fix everything, so I can suggest you to update or see the code and fix it in your local files. Feel free to reopen if you see additional problems.
thanks, now everything works
thanks guys. I will try to update the fix and remove my manual changes.
Looks like the mqtt interface has changed from
await async_subscribe_topics -> async_prepare_subscribe_topics
in the climate.py.