Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions homeassistant/components/mychevy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from homeassistant.helpers import discovery
from homeassistant.util import Throttle

REQUIREMENTS = ["mychevy==1.1.0"]
REQUIREMENTS = ["mychevy==1.2.0"]

DOMAIN = 'mychevy'
UPDATE_TOPIC = DOMAIN
Expand All @@ -33,10 +33,15 @@
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=30)
ERROR_SLEEP_TIME = timedelta(minutes=30)

CONF_COUNTRY = 'country'
DEFAULT_COUNTRY = 'us'

CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Optional(CONF_COUNTRY, default=DEFAULT_COUNTRY):
vol.All(cv.string, vol.In(['us', 'ca']))
}),
}, extra=vol.ALLOW_EXTRA)

Expand Down Expand Up @@ -72,7 +77,8 @@ def setup(hass, base_config):

email = config.get(CONF_USERNAME)
password = config.get(CONF_PASSWORD)
hass.data[DOMAIN] = MyChevyHub(mc.MyChevy(email, password), hass,
country = config.get(CONF_COUNTRY)
hass.data[DOMAIN] = MyChevyHub(mc.MyChevy(email, password, country), hass,
base_config)
hass.data[DOMAIN].start()

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ motorparts==1.0.2
mutagen==1.41.1

# homeassistant.components.mychevy
mychevy==1.1.0
mychevy==1.2.0

# homeassistant.components.mycroft
mycroftapi==2.0
Expand Down