Use voluptuous for pushbullet, pushetta and pushover (#3240)
This commit is contained in:
1 parent
22870d424a
commit
9eacde0005
3 files changed
+30
-18
No files matched your search
@@ -18,8 +18,10 @@ REQUIREMENTS = ['python-pushover==0.2']
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CONF_USER_KEY = 'user_key'
|
||||
|
||||
PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend({
|
||||
vol.Required('user_key'): cv.string,
|
||||
vol.Required(CONF_USER_KEY): cv.string,
|
||||
vol.Required(CONF_API_KEY): cv.string,
|
||||
})
|
||||
|
||||
@@ -30,7 +32,7 @@ def get_service(hass, config):
|
||||
from pushover import InitError
|
||||
|
||||
try:
|
||||
return PushoverNotificationService(config['user_key'],
|
||||
return PushoverNotificationService(config[CONF_USER_KEY],
|
||||
config[CONF_API_KEY])
|
||||
except InitError:
|
||||
_LOGGER.error(
|
||||
|
||||
Reference in new issue
Block a user