A few lint fixes to event decorators.
This commit is contained in:
parent
02e634c6a2
commit
ef92940ffb
1 changed files with 3 additions and 2 deletions
|
@ -70,10 +70,10 @@ class Automation(object):
|
||||||
|
|
||||||
hass = None
|
hass = None
|
||||||
|
|
||||||
def __init__(self, action, event, event_args):
|
def __init__(self, action, event_fun, event_args):
|
||||||
# store action and config
|
# store action and config
|
||||||
self.action = action
|
self.action = action
|
||||||
self._event = (event, event_args)
|
self._event = (event_fun, event_args)
|
||||||
self._activated = False
|
self._activated = False
|
||||||
self._last_run = None
|
self._last_run = None
|
||||||
self._running = 0
|
self._running = 0
|
||||||
|
@ -86,6 +86,7 @@ class Automation(object):
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
""" Call the action """
|
""" Call the action """
|
||||||
|
# pylint: disable=broad-except
|
||||||
if not self.activated:
|
if not self.activated:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue