Skip to content

Commit 0bbc782

Browse files
committed
Tasmota:
- bump to 1.6.1 - add try/except for extracting wifi signal
1 parent ee85891 commit 0bbc782

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

tasmota/__init__.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Tasmota(MqttPlugin):
3434
Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items
3535
"""
3636

37-
PLUGIN_VERSION = '1.6.0'
37+
PLUGIN_VERSION = '1.6.1'
3838

3939
LIGHT_MSG = ['HSBColor', 'Dimmer', 'Color', 'CT', 'Scheme', 'Fade', 'Speed', 'LedTable', 'White']
4040

@@ -1418,11 +1418,15 @@ def _handle_wifi(self, device: str, payload: dict) -> None:
14181418
14191419
"""
14201420
self.logger.debug(f"_handle_wifi: received payload={payload}")
1421-
wifi_signal = payload.get('Signal')
1422-
if wifi_signal:
1423-
if isinstance(wifi_signal, str) and wifi_signal.isdigit():
1424-
wifi_signal = int(wifi_signal)
1425-
self.tasmota_devices[device]['wifi_signal'] = wifi_signal
1421+
try:
1422+
wifi_signal = payload.get('Signal')
1423+
except AttributeError:
1424+
pass
1425+
else:
1426+
if wifi_signal:
1427+
if isinstance(wifi_signal, str) and wifi_signal.isdigit():
1428+
wifi_signal = int(wifi_signal)
1429+
self.tasmota_devices[device]['wifi_signal'] = wifi_signal
14261430

14271431
def _handle_setting(self, device: str, payload: dict) -> None:
14281432
"""

tasmota/plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugin:
1212
documentation: http://smarthomeng.de/user/plugins/tasmota/user_doc.html
1313
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1520293-support-thread-für-das-tasmota-plugin
1414

15-
version: 1.6.0 # Plugin version
15+
version: 1.6.1 # Plugin version
1616
sh_minversion: 1.10.0.3 # minimum shNG version to use this plugin
1717
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
1818
# py_minversion: # minimum Python version to use for this plugin

0 commit comments

Comments
 (0)