mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
bump usps version (#12465)
This commit is contained in:
parent
92aeef82ef
commit
02c05e2490
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user