GameDevHobby / Domoticz-LGTV-WebOS-Plugin

LG TV WebOS 3 Plugin for Domoticz
14 stars 13 forks source link

sanitize volume before trying to process it #3

Closed koenkooi closed 6 years ago

koenkooi commented 6 years ago

Fix #1

This gets rid of:

(55" LG TV) 'onHeartbeat' failed 'ValueError':'invalid literal for int() with base 10: 'Traceback (most recent call last):\n File "/var/lib/domoticz/plugins/lgtv/lg.py", line 194, in \n main()\n File "/var/lib/domoticz/plugins/lgtv/lg.py", line 189, in main\n print(cmd.r'.

And fix the other error that surfaces after fixing the first:

(55" LG TV) Entering work loop. (55" LG TV) 'onHeartbeat' failed 'TypeError':'Can't convert 'int' object to str implicitly'. (55" LG TV) ----> Line 369 in /var/lib/domoticz/plugins/lgtv/plugin.py, function onHeartbeat (55" LG TV) ----> Line 259 in /var/lib/domoticz/plugins/lgtv/plugin.py, function onHeartbeat (55" LG TV) ----> Line 345 in /var/lib/domoticz/plugins/lgtv/plugin.py, function GetTVInfo