This project is an attempt to create an integration to consume services provided by Zero Motorcycles for their 3rd gen electric motorcycles that come with integrated cellular connection and cloud service.
All you need for this integration to work is your login. That is the username and password you use for the official Zero Motorcycles app.
Currently not available in default HACS repo because that requires me to make a brand first.
For now you either have to install it manually by dropping the custom_components folder contents into your HA installation. Or by adding this repo as a custom repo within HACS. For that, within HACS just select "add repo" then pick "integration" as type and enter a name and the url of this repo. Or read here https://hacs.xyz/docs/faq/custom_repositories/
Then you can add a new integration, search for "Zero" to find this one:
Next you'll get a quick installation wizard, enter your credentials here:
Once done this integration should be visible:
An example of all the data it fetches. Note that in later releases sensor names have been adapted to include unit numbers so that these can be created for all units in case someone owns more than 1 zero motorcycle.
Because we can!
This is literally my first Home Assistant integration so there is still a lot to do and as of now there are still some limitations. Here is an attempt to describe those:
- Coordindator is hardcoded to update every 5 minutes, if you need more you'll have to
change that manually for now. For this search for the
(minutes=5)
line in thecoordinator.py
file and change it to what you prefer.
- parse numeric values (if needed that is)
- allow user to configure update interval from UI
- bugfix removing
KeyError: 'attribution'
fromentity.py
closing #52
- Bugfix updating missing sensor config
Contributions provided by @michavelli-og ref ticket #52
- Update device_tracker.py to use SourceType.GPS instead of deprecated SOURCE_TYPE_GPS
- Update sensor.py use native unit
- created device_tracker for location
- simplified sensor names + fix for multiple units
- get version from manifest instead of constants
- ignored yaml setup since not supported
- added binary sensors
- added device class to most sensors
- renamed sensors to be unique per unit number
- fetch values for all unit numbers
initial release
Here is a picture of my 14.4 kWh Zero SRF premium with charge tank for 12 kW maximum charging power (if conditions are met).
I have since sold this motorcycle (went to France!) and now mostly ride a 2021 Energice SS9+ with 21.5 kWh battery and 24 kW charge speed.
A good code example for sensors and device_trackers is the Porsche Connect integration with sources available at https://github.com/CJNE/ha-porscheconnect