Unused component, displays error

Hey.

I previously used a component that ive stopped using and removed from my config files, but now it shows an error every time i start Home Assistant.
How can i remove an old and unused component?
Ive reinstalled my venv.

My error log:

Error during setup of component octoprint
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/octoprint.py”, line 95, in setup
for printer in config[DOMAIN]:
KeyError: ‘octoprint’

remove it from discovery by ignoring it:

Actually, that doesn’t use discovery.

Do you have a leftover sensor from octoprint in HA?

No, not in the configs and not in the “States” list. That is the wierd part.

Or a binary_sensor?

These would be located in 3 sections, octoprint: section in your configuration.yaml. platform: octoprint in sensors and platform: octoprint in binary_sensors

No, i dont have anything when searching for octoprint* in all config files.

Well, it looks like it’s an issue with the component. Try putting octoprint in the ignore section of discovery for shits and giggles. If that doesn’t work, you found and issue and you should probably write it up. I’m looking at the code and it looks like the component is expecting the domain to exist. It also looks like it gets discovered and that is the root cause of the problem. I think this would affect everyone who has an octoprint device that doesn’t configure it in home assistant. I’m guessing you are the only person who doesn’t want it integrated, which is why you are the only person seeing the issue.

Ignoring the component in discovery worked just fine, thanks.

discovery:
ignore:
- octoprint

Someone needs to be the first :wink:

I changed to MQTT for monitoring my printers in Home Assistant, it was something that i did not like or did not get to work out with the Octoprint component but i cant remember what it was. :slight_smile:

1 Like