mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Version bump to 0.56.2
This commit is contained in:
parent
32f58baa85
commit
79d71c6727
@ -36,11 +36,12 @@ def async_trigger(hass, config, action):
|
|||||||
@callback
|
@callback
|
||||||
def handle_event(event):
|
def handle_event(event):
|
||||||
"""Listen for events and calls the action when data matches."""
|
"""Listen for events and calls the action when data matches."""
|
||||||
try:
|
if event_data_schema:
|
||||||
event_data_schema(event.data)
|
try:
|
||||||
except vol.Invalid:
|
event_data_schema(event.data)
|
||||||
# If event data doesn't match requested schema, skip event
|
except vol.Invalid:
|
||||||
return
|
# If event data doesn't match requested schema, skip event
|
||||||
|
return
|
||||||
|
|
||||||
hass.async_run_job(action, {
|
hass.async_run_job(action, {
|
||||||
'trigger': {
|
'trigger': {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"""Constants used by Home Assistant components."""
|
"""Constants used by Home Assistant components."""
|
||||||
MAJOR_VERSION = 0
|
MAJOR_VERSION = 0
|
||||||
MINOR_VERSION = 56
|
MINOR_VERSION = 56
|
||||||
PATCH_VERSION = '1'
|
PATCH_VERSION = '2'
|
||||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||||
REQUIRED_PYTHON_VER = (3, 4, 2)
|
REQUIRED_PYTHON_VER = (3, 4, 2)
|
||||||
|
@ -370,6 +370,12 @@ class EntityPlatform(object):
|
|||||||
|
|
||||||
def add_entities(self, new_entities, update_before_add=False):
|
def add_entities(self, new_entities, update_before_add=False):
|
||||||
"""Add entities for a single platform."""
|
"""Add entities for a single platform."""
|
||||||
|
# That avoid deadlocks
|
||||||
|
if update_before_add:
|
||||||
|
self.component.logger.warning(
|
||||||
|
"Call 'add_entities' with update_before_add=True "
|
||||||
|
"only inside tests or you can run into a deadlock!")
|
||||||
|
|
||||||
run_coroutine_threadsafe(
|
run_coroutine_threadsafe(
|
||||||
self.async_add_entities(list(new_entities), update_before_add),
|
self.async_add_entities(list(new_entities), update_before_add),
|
||||||
self.component.hass.loop).result()
|
self.component.hass.loop).result()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user