edekeijzer / OctoPrint-PSUControl-HomeAssistant

GNU Affero General Public License v3.0
30 stars 8 forks source link

traceback when trying to power on a Home Assistant entity #15

Closed simowilso closed 1 year ago

simowilso commented 1 year ago

Hello, this is the first time I have tried this plugin. I think I've configured it correctly but I see the following in the log, any pointers where to look please? I am running Octoprint and HA inside Docker containers.

2023-01-26 14:33:11,727 - octoprint.server.api - ERROR - Error calling SimpleApiPlugin ophom Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/octoprint/server/api/__init__.py", line 94, in pluginData response = api_plugin.on_api_get(request) File "/usr/local/lib/python3.8/site-packages/octoprint/util/__init__.py", line 1688, in wrapper return f(*args, **kwargs) File "/octoprint/plugins/lib/python3.8/site-packages/octoprint_phom/__init__.py", line 202, in on_api_get if(r.json()['state']['on']): TypeError: list indices must be integers or slices, not str

edekeijzer commented 1 year ago

This is not logging from my plugin.