Clean up notifiy component
This commit is contained in:
parent
3947691347
commit
3b3f5fe6fe
13 changed files with 143 additions and 253 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue