mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Clearified some behavior
This commit is contained in:
parent
66d432d0a2
commit
5ae08c6f0f
@ -147,6 +147,8 @@ class EventBus(object):
|
|||||||
|
|
||||||
To listen to all events specify the constant ``ALL_EVENTS``
|
To listen to all events specify the constant ``ALL_EVENTS``
|
||||||
as event_type.
|
as event_type.
|
||||||
|
|
||||||
|
Note: at the moment it is impossible to remove a one time listener.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def onetime_listener(event):
|
def onetime_listener(event):
|
||||||
@ -214,7 +216,6 @@ class StateMachine(object):
|
|||||||
|
|
||||||
def is_state(self, category, state):
|
def is_state(self, category, state):
|
||||||
""" Returns True if category is specified state. """
|
""" Returns True if category is specified state. """
|
||||||
self._validate_category(category)
|
|
||||||
|
|
||||||
return self.get_state(category).state == state
|
return self.get_state(category).state == state
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user