Clean up notifiy component

This commit is contained in:
Paulus Schoutsen 2015-11-08 22:15:34 -08:00
parent 3947691347
commit 3b3f5fe6fe
13 changed files with 143 additions and 253 deletions

View file

@ -20,14 +20,14 @@ _LOGGER = logging.getLogger(__name__)
def get_service(hass, config):
""" Get the file notification service. """
if not validate_config(config,
if not validate_config({DOMAIN: config},
{DOMAIN: ['filename',
'timestamp']},
_LOGGER):
return None
filename = config[DOMAIN]['filename']
timestamp = config[DOMAIN]['timestamp']
filename = config['filename']
timestamp = config['timestamp']
return FileNotificationService(hass, filename, timestamp)