From 02c05e24904fe6a6bbbec62c0e655c5e0a290c36 Mon Sep 17 00:00:00 2001
From: happyleavesaoc <happyleaves.tfr@gmail.com>
Date: Sun, 18 Feb 2018 00:49:32 -0500
Subject: [PATCH] bump usps version (#12465)

---
 homeassistant/components/usps.py | 8 ++++++--
 requirements_all.txt             | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/homeassistant/components/usps.py b/homeassistant/components/usps.py
index 58f858b0975..364562f1119 100644
--- a/homeassistant/components/usps.py
+++ b/homeassistant/components/usps.py
@@ -15,7 +15,7 @@ from homeassistant.helpers import (config_validation as cv, discovery)
 from homeassistant.util import Throttle
 from homeassistant.util.dt import now
 
-REQUIREMENTS = ['myusps==1.2.2']
+REQUIREMENTS = ['myusps==1.3.2']
 
 _LOGGER = logging.getLogger(__name__)
 
@@ -24,6 +24,7 @@ DATA_USPS = 'data_usps'
 MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=30)
 COOKIE = 'usps_cookies.pickle'
 CACHE = 'usps_cache'
+CONF_DRIVER = 'driver'
 
 USPS_TYPE = ['sensor', 'camera']
 
@@ -32,6 +33,7 @@ CONFIG_SCHEMA = vol.Schema({
         vol.Required(CONF_USERNAME): cv.string,
         vol.Required(CONF_PASSWORD): cv.string,
         vol.Optional(CONF_NAME, default=DOMAIN): cv.string,
+        vol.Optional(CONF_DRIVER): cv.string
     }),
 }, extra=vol.ALLOW_EXTRA)
 
@@ -42,13 +44,15 @@ def setup(hass, config):
     username = conf.get(CONF_USERNAME)
     password = conf.get(CONF_PASSWORD)
     name = conf.get(CONF_NAME)
+    driver = conf.get(CONF_DRIVER)
 
     import myusps
     try:
         cookie = hass.config.path(COOKIE)
         cache = hass.config.path(CACHE)
         session = myusps.get_session(username, password,
-                                     cookie_path=cookie, cache_path=cache)
+                                     cookie_path=cookie, cache_path=cache,
+                                     driver=driver)
     except myusps.USPSError:
         _LOGGER.exception('Could not connect to My USPS')
         return False
diff --git a/requirements_all.txt b/requirements_all.txt
index 78c2ff23816..86368c45b93 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -501,7 +501,7 @@ mychevy==0.1.1
 mycroftapi==2.0
 
 # homeassistant.components.usps
-myusps==1.2.2
+myusps==1.3.2
 
 # homeassistant.components.media_player.nad
 # homeassistant.components.media_player.nadtcp
-- 
GitLab