Skip to content

Incompatibility between the paho-mqtt Python library and the Tuya Sharing library (tuya_sharing). #1053

@ggar10

Description

@ggar10

HAOS : core version 2025.10.3 - OS version 16.2

Logging :

ERROR (Thread-8) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.13/threading.py", line 1043, in _bootstrap_inner self.run() ~~~~~~~~^^ File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 118, in run self.__run_mqtt() ~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 136, in __run_mqtt mqttc = self._start(mq_config) File "/usr/local/lib/python3.13/site-packages/tuya_sharing/mq.py", line 143, in _start mqttc = mqtt.Client(mq_config.client_id) File "/usr/local/lib/python3.13/site-packages/paho/mqtt/client.py", line 772, in init raise ValueError( "Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for details" ) ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for details


The Tuya Sharing integration uses paho-mqtt to do MQTT communication.

New versions of paho-mqtt (2.x) have a new callback_api_version parameter.

The tuya_sharing code was written for paho-mqtt < 2.0, so it doesn't work with the latest library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions