diff --git a/homeassistant/components/script.py b/homeassistant/components/script.py index 3e13db66699..238bea7dd4c 100644 --- a/homeassistant/components/script.py +++ b/homeassistant/components/script.py @@ -81,7 +81,7 @@ def setup(hass, config): object_id) continue alias = cfg.get(CONF_ALIAS, object_id) - script = Script(hass, object_id, alias, cfg[CONF_SEQUENCE]) + script = Script(object_id, alias, cfg[CONF_SEQUENCE]) component.add_entities((script,)) hass.services.register(DOMAIN, object_id, service_handler) @@ -106,8 +106,7 @@ def setup(hass, config): class Script(ToggleEntity): """ Represents a script. """ # pylint: disable=too-many-instance-attributes - def __init__(self, hass, object_id, name, sequence): - self.hass = hass + def __init__(self, object_id, name, sequence): self.entity_id = ENTITY_ID_FORMAT.format(object_id) self._name = name self.sequence = sequence