plugins icon indicating copy to clipboard operation
plugins copied to clipboard

Tasmota: Bugfix

Open sisamiwe opened this issue 4 months ago • 3 comments

  • bump to 1.6.1
  • add try/except for extracting wifi signal

sisamiwe avatar Oct 12 '25 14:10 sisamiwe

Hey,

Der Fehler kam 1x pro Tag uns sah immer so aus:

2025-10-05 18:36:07 ERROR plugins.tasmota Exception AttributeError: 'str' object has no attribute 'get' Traceback (most recent call last): File "/usr/local/smarthome/plugins/tasmota/init.py", line 930, in on_mqtt_message self._handle_wifi(tasmota_topic, payload['Wifi']) File "/usr/local/smarthome/plugins/tasmota/init.py", line 1421, in _handle_wifi wifi_signal = payload.get('Signal') AttributeError: 'str' object has no attribute 'get'

sisamiwe avatar Oct 12 '25 18:10 sisamiwe

deshalb hatte ich den AttributError abgefangen

sisamiwe avatar Oct 12 '25 18:10 sisamiwe

Das Problem ist an der Stelle, dass dein payload kein dict ist, sondern ein str. Würde ich mir mal ausgeben lassen und dann schauen, ob du nicht aus dem str auch die Daten bekommst, die du brauchst.

Morg42 avatar Oct 12 '25 19:10 Morg42