mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Remove unnecessary instance variable
This commit is contained in:
parent
475b631d9c
commit
0a711922ef
@ -81,7 +81,7 @@ def setup(hass, config):
|
|||||||
object_id)
|
object_id)
|
||||||
continue
|
continue
|
||||||
alias = cfg.get(CONF_ALIAS, object_id)
|
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,))
|
component.add_entities((script,))
|
||||||
hass.services.register(DOMAIN, object_id, service_handler)
|
hass.services.register(DOMAIN, object_id, service_handler)
|
||||||
|
|
||||||
@ -106,8 +106,7 @@ def setup(hass, config):
|
|||||||
class Script(ToggleEntity):
|
class Script(ToggleEntity):
|
||||||
""" Represents a script. """
|
""" Represents a script. """
|
||||||
# pylint: disable=too-many-instance-attributes
|
# pylint: disable=too-many-instance-attributes
|
||||||
def __init__(self, hass, object_id, name, sequence):
|
def __init__(self, object_id, name, sequence):
|
||||||
self.hass = hass
|
|
||||||
self.entity_id = ENTITY_ID_FORMAT.format(object_id)
|
self.entity_id = ENTITY_ID_FORMAT.format(object_id)
|
||||||
self._name = name
|
self._name = name
|
||||||
self.sequence = sequence
|
self.sequence = sequence
|
||||||
|
Loading…
x
Reference in New Issue
Block a user