Configure two BMW

I’m trying to configure two BMW with the bmw-connected-drive. Is that possible?
I was hoping a configuration like this would work:

bmw_connected_drive:
  -  mycar:
       username: USERNAME_BMW_1
       password: PASSWORD_BMW_1
       region: REGION_BMW_1
  -  mywifescar:
       username: USERNAME_BMW_2
       password: PASSWORD_BMW_2
       region: REGION_2

Anybody had the same problem?

What error messages do you get when trying this? Or is only one car visible?

What will work is when you have both cars on the same Connected Drive account, but I can imagine that is not the solution you’re looking for.

When checking the configuration I get this message:

Invalid config for [bmw_connected_drive]: expected a dictionary for dictionary value @ data['bmw_connected_drive']. Got [OrderedDict([('x3', OrderedDict([('username', 'myname'), ('password', 'mypwd'), ('region', 'rest_of_world')]))]), OrderedDict([('i3', OrderedDict([('username', 'mywife'), ('password', 'wifepwd'), ('region', 'rest_of_world')]))])]. (See /config/configuration.yaml, line 102). Please check the docs at https://home-assistant.io/components/bmw_connected_drive/

Yes, you are right, it’s not the solution with 2 cars in the same account I’m looking for :slight_smile:

Unfortunately two accounts that way is not supported atm.

You could duplicate the component and give one a new name, place it in custom components and then config with one account each

bmw_connected_drive:
  name1:
    username: USERNAME_BMW_CONNECTED_DRIVE
    password: PASSWORD_BMW_CONNECTED_DRIVE
    region: one of "north_america", "china", "rest_of_world"
  name2:
    username: USERNAME_BMW_CONNECTED_DRIVE
    password: PASSWORD_BMW_CONNECTED_DRIVE
    region: one of "north_america", "china", "rest_of_world"

Not quite sure how picky home assistant is, but your config looks incorrect with - that shouldn’t be there…

See Lost newbie, can't figure automation out this on how dictionary’s work, this is a similar error with incorrect “-”'s and Error in script syntax

Thanks alot, I got it working now.

Nice catch :smile:

Good to see this is working after all.

Share then…
might help others… like me :wink: