Async syntax 6, sensor (#17020)
This commit is contained in:
parent
121dba659c
commit
9e4c8f45d6
45 changed files with 195 additions and 319 deletions
|
@ -4,7 +4,6 @@ Entity to track connections to stream API.
|
|||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.api_stream/
|
||||
"""
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||
|
@ -48,9 +47,8 @@ class StreamHandler(logging.Handler):
|
|||
self.entity.schedule_update_ha_state()
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_setup_platform(hass, config, async_add_entities,
|
||||
discovery_info=None):
|
||||
async def async_setup_platform(hass, config, async_add_entities,
|
||||
discovery_info=None):
|
||||
"""Set up the API stream platform."""
|
||||
entity = APICount()
|
||||
handler = StreamHandler(entity)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue