mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Update docstrings (#17435)
This commit is contained in:
parent
253e154a79
commit
7b0c88c54b
@ -2,7 +2,7 @@
|
|||||||
Entity to track connections to stream API.
|
Entity to track connections to stream API.
|
||||||
|
|
||||||
For more details about this platform, please refer to the documentation at
|
For more details about this platform, please refer to the documentation at
|
||||||
https://home-assistant.io/components/sensor.api_stream/
|
https://home-assistant.io/components/sensor.api_streams/
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -47,9 +47,9 @@ class StreamHandler(logging.Handler):
|
|||||||
self.entity.schedule_update_ha_state()
|
self.entity.schedule_update_ha_state()
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(hass, config, async_add_entities,
|
async def async_setup_platform(
|
||||||
discovery_info=None):
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Set up the API stream platform."""
|
"""Set up the API streams platform."""
|
||||||
entity = APICount()
|
entity = APICount()
|
||||||
handler = StreamHandler(entity)
|
handler = StreamHandler(entity)
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ async def async_setup_platform(hass, config, async_add_entities,
|
|||||||
|
|
||||||
|
|
||||||
class APICount(Entity):
|
class APICount(Entity):
|
||||||
"""Entity to represent how many people are connected to stream API."""
|
"""Entity to represent how many people are connected to the stream API."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Initialize the API count."""
|
"""Initialize the API count."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user