mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 12:30:31 +00:00
Black
This commit is contained in:
@@ -4,12 +4,13 @@ from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from .const import (
|
||||
SIGNAL_WEBSOCKET_CONNECTED, SIGNAL_WEBSOCKET_DISCONNECTED,
|
||||
DATA_CONNECTIONS)
|
||||
SIGNAL_WEBSOCKET_CONNECTED,
|
||||
SIGNAL_WEBSOCKET_DISCONNECTED,
|
||||
DATA_CONNECTIONS,
|
||||
)
|
||||
|
||||
|
||||
async 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 streams platform."""
|
||||
entity = APICount()
|
||||
|
||||
@@ -26,9 +27,11 @@ class APICount(Entity):
|
||||
async def async_added_to_hass(self):
|
||||
"""Added to hass."""
|
||||
self.hass.helpers.dispatcher.async_dispatcher_connect(
|
||||
SIGNAL_WEBSOCKET_CONNECTED, self._update_count)
|
||||
SIGNAL_WEBSOCKET_CONNECTED, self._update_count
|
||||
)
|
||||
self.hass.helpers.dispatcher.async_dispatcher_connect(
|
||||
SIGNAL_WEBSOCKET_DISCONNECTED, self._update_count)
|
||||
SIGNAL_WEBSOCKET_DISCONNECTED, self._update_count
|
||||
)
|
||||
self._update_count()
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user