Migrate integrations w-z to extend SensorEntity (#48217)

This commit is contained in:
Erik Montnemery 2021-03-22 19:50:29 +01:00 committed by GitHub
parent 783b453bbe
commit 0c086b5067
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 72 additions and 79 deletions

View file

@ -1,7 +1,7 @@
"""Entity to track connections to websocket API."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.core import callback
from homeassistant.helpers.entity import Entity
from .const import (
DATA_CONNECTIONS,
@ -19,7 +19,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
async_add_entities([entity])
class APICount(Entity):
class APICount(SensorEntity):
"""Entity to represent how many people are connected to the stream API."""
def __init__(self):