Long story short I was working on a Luminus Home Assistant integration to get my electricity bills in the system when I realised I never botherd implementing one for the starcom API that my Zero (back when I still had one) posted data to. So I did a thing.
It’s available at https://github.com/hanscappelle/zero-motorcycles-integration and open source so feel free to have a look and change things or report bugs. I haven’t tested it with an account that has multiple zero motorcycles but in theory that should also work.
After creating this I noticed people were already doing this using rest sensor templates. This also works but is a lot more work to set up. Still it’s an interesting approach. Follow the link to a reddit post explaining how that’s done.
The difference with my approach is that I’ve created an integration so that people can simply add in to their HA setup. For that to work there are some steps explained in the repo. In short you’ll need the HACS integration and then in the HACS setup you should add the github repo as a repository. Next you can go to your HA settings and navigate to integrations and add it with the plus button. Searching for “Zero” should reveal it.
The config will prompt you for your zero username and password. These are the credentials you use for the Zero Motorcycles app.
And then you’ll have the decvice and sensors added to your configuration so you can put them on the dashboards and use the values as is. There is even a device_tracker so that the location of your Zero shows on the map. And you can use it’s location for automations.