Black
This commit is contained in:
1 parent
da05dfe708
commit
4de97abc3a
2676 files changed
+163166
-140084
No files matched your search
@@ -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