mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Removing asyncio.coroutine syntax from HASS core (#12509)
* changed asyncio.coroutine syntax to new async def/await * removed py34 from tox environment * reverted some changes within entity.py * - * reverted changes within bootstrap.py * reverted changes within discovery.py * switched decorators * Reverted change within aiohttp_client.py * reverted change within logging.py * switched decorators * Await lock properly * removed asyncio.coroutine from test
This commit is contained in:
committed by
Paulus Schoutsen
parent
eacfbc048a
commit
16cb7388ee
@@ -332,11 +332,10 @@ class Entity(object):
|
||||
if self.parallel_updates:
|
||||
self.parallel_updates.release()
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_remove(self):
|
||||
async def async_remove(self):
|
||||
"""Remove entity from Home Assistant."""
|
||||
if self.platform is not None:
|
||||
yield from self.platform.async_remove_entity(self.entity_id)
|
||||
await self.platform.async_remove_entity(self.entity_id)
|
||||
else:
|
||||
self.hass.states.async_remove(self.entity_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user