forked from peter/volvo2mqtt
Fix AttributeError for paho-mqtt < 2.0 compatibility (#321)
When paho-mqtt < 2.0 is installed (e.g. in cached Docker layers), mqtt.CallbackAPIVersion does not exist, causing an immediate crash on startup with: AttributeError: module 'paho.mqtt.client' has no attribute 'CallbackAPIVersion' Add try/except fallback so the addon works with both paho-mqtt 1.x and 2.x, eliminating the crash and allowing the addon to start correctly. Co-authored-by: Barry Jarman <bazza@Barrys-Mac-mini.local> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Barry Jarman
Copilot
parent
76cfa21db7
commit
48663d2e0d
@@ -1,3 +1,9 @@
|
||||
## v1.13.4
|
||||
|
||||
### 🐛 Bug Fixes:
|
||||
|
||||
- Fix `AttributeError: module 'paho.mqtt.client' has no attribute 'CallbackAPIVersion'` when paho-mqtt < 2.0 is installed
|
||||
|
||||
## v1.13.3
|
||||
|
||||
### 🐛 Bug Fixes:
|
||||
|
||||
Reference in New Issue
Block a user