mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 14:30:22 +00:00
Cleanup run_callback_threadsafe (#6187)
* Cleanup run_callback_threadsafe * fix spell * Revert image_processing, they need to wait for update
This commit is contained in:
committed by
Paulus Schoutsen
parent
1cd1facbd0
commit
106b7a9d8f
@@ -22,7 +22,6 @@ from homeassistant.const import (EVENT_HOMEASSISTANT_START,
|
||||
STATE_NOT_HOME, STATE_OFF, STATE_ON,
|
||||
ATTR_HIDDEN, HTTP_BAD_REQUEST)
|
||||
from homeassistant.core import State, split_entity_id, DOMAIN as HA_DOMAIN
|
||||
from homeassistant.util.async import run_callback_threadsafe
|
||||
|
||||
DOMAIN = "logbook"
|
||||
DEPENDENCIES = ['recorder', 'frontend']
|
||||
@@ -68,9 +67,7 @@ LOG_MESSAGE_SCHEMA = vol.Schema({
|
||||
|
||||
def log_entry(hass, name, message, domain=None, entity_id=None):
|
||||
"""Add an entry to the logbook."""
|
||||
run_callback_threadsafe(
|
||||
hass.loop, async_log_entry, hass, name, message, domain, entity_id
|
||||
).result()
|
||||
hass.add_job(async_log_entry, hass, name, message, domain, entity_id)
|
||||
|
||||
|
||||
def async_log_entry(hass, name, message, domain=None, entity_id=None):
|
||||
|
||||
Reference in New Issue
Block a user