I started by creating an nzbget component that supports a switch to pause nzbet and sensors just like the transmission platform. This is working but I find the setup somewhat awkward and it isn’t very flexible.
Now I’d like to try a different approach. I want to create a custom component with a single entity (for instance nzbget.nzbget) that holds the entire nzbget status as it’s state attributes and handles the connection to the nzbget server.
I’d then like to create a service that you can just give the entity name and the function name to use all possible JSON-RPC features. I can then always still add the most commonly used items as sensors and switches. These then simply use that central entity to get their data.
The problem is that I can’t even get the component to load, it fails with a fairly generic error:
2019-02-25 12:45:48 ERROR (MainThread) [homeassistant.loader] Unable to find platform None
2019-02-25 12:45:48 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform None.nzbget2: Platform not found.
Can anyone help me resolve this error? The dev documentation is very sparse, so I’m constantly lost. I can also imagine that I’m approaching this in entirely the wrong manner, so I’d like to hear suggestions on how to handle this generically as well.
The first version (this works) can be found here: https://github.com/sophof/home-assistant/tree/nzbget/homeassistant/components/nzbget
The second version here: https://github.com/sophof/home-assistant/tree/nzbget/homeassistant/components/nzbget2