1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

PyLint 1.5 fixes

This commit is contained in:
Paulus Schoutsen
2015-11-29 13:49:05 -08:00
parent 01203c7c4c
commit a301d869d7
32 changed files with 96 additions and 94 deletions

View File

@@ -9,7 +9,6 @@ https://home-assistant.io/components/script/
"""
import logging
from datetime import timedelta
import homeassistant.util.dt as date_util
from itertools import islice
import threading
@@ -17,6 +16,7 @@ from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.helpers.event import track_point_in_utc_time
from homeassistant.util import slugify, split_entity_id
import homeassistant.util.dt as date_util
from homeassistant.const import (
ATTR_ENTITY_ID, EVENT_TIME_CHANGED, STATE_ON, SERVICE_TURN_ON,
SERVICE_TURN_OFF)
@@ -73,12 +73,12 @@ def setup(hass, config):
for object_id, cfg in config[DOMAIN].items():
if object_id != slugify(object_id):
_LOGGER.warn("Found invalid key for script: %s. Use %s instead.",
object_id, slugify(object_id))
_LOGGER.warning("Found invalid key for script: %s. Use %s instead",
object_id, slugify(object_id))
continue
if not isinstance(cfg.get(CONF_SEQUENCE), list):
_LOGGER.warn("Key 'sequence' for script %s should be a list",
object_id)
_LOGGER.warning("Key 'sequence' for script %s should be a list",
object_id)
continue
alias = cfg.get(CONF_ALIAS, object_id)
script = Script(hass, object_id, alias, cfg[CONF_SEQUENCE])