Cleanup async handling (#6388)
* Cleanups unneeded blocks * Cleanup bootstrap * dedicated update_ha_state * Fix imap_email_content * fx tests * Fix lint & spell
This commit is contained in:
1 parent
3044aecbe9
commit
8232f1ef65
30 files changed
+124
-108
No files matched your search
@@ -309,13 +309,10 @@ class EntityPlatform(object):
|
||||
|
||||
def schedule_add_entities(self, new_entities, update_before_add=False):
|
||||
"""Add entities for a single platform."""
|
||||
if update_before_add:
|
||||
for entity in new_entities:
|
||||
entity.update()
|
||||
|
||||
run_callback_threadsafe(
|
||||
self.component.hass.loop,
|
||||
self.async_schedule_add_entities, list(new_entities), False
|
||||
self.async_schedule_add_entities, list(new_entities),
|
||||
update_before_add
|
||||
).result()
|
||||
|
||||
@callback
|
||||
|
||||
Reference in new issue
Block a user