Async syntax 6, sensor (#17020)
This commit is contained in:
1 parent
121dba659c
commit
9e4c8f45d6
45 files changed
+195
-319
No files matched your search
@@ -741,10 +741,9 @@ class WUndergroundSensor(Entity):
|
||||
"""Return the units of measurement."""
|
||||
return self._unit_of_measurement
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_update(self):
|
||||
async def async_update(self):
|
||||
"""Update current conditions."""
|
||||
yield from self.rest.async_update()
|
||||
await self.rest.async_update()
|
||||
|
||||
if not self.rest.data:
|
||||
# no data, return
|
||||
|
||||
Reference in new issue
Block a user