Invalid config for basic mqtt custom component example

I get the following error on my HA frontend after following the ‘create custom component with basic mqtt example’ tutorial.

I’ve followed the instructions to the letter, the python custom component file name is the same as is mentioned in the configuration files. One thing bothers me, as I’m not sure what to set:

topic: some_mqtt/topic/here

to in configuration.yaml, or indeed, if it’s what’s causing the misconfiguration. I’m not sure what to set ‘some_mqtt/topic/here’ to. Can I make up my choice of topic that will be used to listen to messages sent when I send data through the ‘call services’ section of the frontend UI?

My configuration.yaml file is shown below:

You aren’t giving enough information for anyone to help. Post a link of the tutorial you are following. Also, post the logs, they will contain the issue that is actually causing your problem. Invalid config is just a byproduct of an error occurring in your component. Without seeing what that error is, or what the component is, no one will be able to help.

Ok, here’s the tutorial link:

and the log screens:

That script is outdated and will not work. You’ll need to update the script in order to get it to work. The API changed and a function within the api is complaining that it doesn’t have enough information. I suggest moving to another route if you cannot read/debug/fix python errors.

Have you tried just using a normal MQTT component? I don’t see why you need a custom component.

Is it possible to get the source code for the API, I’d like to have a look and see what I can do.

I’m creating a piece of hardware that has custom written python code (a software driver if you like), that will need to be installed in Home Assistant as a custom component. It so happens that it uses MQTT, so I thought this tutorial example would be a good starting point to making my first component!

There’s a whole site dedicated to the api: