zwift_hass icon indicating copy to clipboard operation
zwift_hass copied to clipboard

What is my_zwift_username ?

Open sebascha opened this issue 2 years ago • 1 comments

Hy, this maybe a stupid question, but what exactly is my username to put into the config file? Is it the Zwift ID, or is it my login mail adress or sth completely different?

sebascha avatar Mar 17 '22 13:03 sebascha

Sorry for the late response on this, but the core developer(s) hasn't responded yet. Your username is your email address. As an aside, if you want your power metrics, you must use your credentials as they are not public. I first created an "api" account using the gmail + trick and noticed this.

So my config looks something like this:

secrets.yaml file:

# zwift id tyler
zwift_tyler_user_id: XXXXXX

# dummy zwift API account
zwift_user: [email protected]
zwift_password: redacted

You get your ID by going to:

C:/Users/USERNAME/Documents/Zwift/cp

There you will see a folder with "userXXXXXX". The number should be your id. If you have multiple users, you'll have to figure out what the corresponding ID is.

configuration.yaml file:

sensor: !include sensors.yaml

sensors.yaml file:

- platform: zwift
  username: !secret zwift_user
  password: !secret zwift_password
  players:
    - !secret zwift_tyler_user_id

Once your configuration is set, you'll most likely have to restart home assistant - I did.

tylerwmarrs avatar Feb 11 '23 14:02 tylerwmarrs