Migrate integrations a-c to extend SensorEntity (#48210)
This commit is contained in:
parent
1bb29bffbb
commit
e0cd7072d6
60 changed files with 139 additions and 139 deletions
|
@ -26,7 +26,7 @@ from pycomfoconnect import (
|
|||
)
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import (
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ICON,
|
||||
|
@ -45,7 +45,6 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import DOMAIN, SIGNAL_COMFOCONNECT_UPDATE_RECEIVED, ComfoConnectBridge
|
||||
|
||||
|
@ -258,7 +257,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
add_entities(sensors, True)
|
||||
|
||||
|
||||
class ComfoConnectSensor(Entity):
|
||||
class ComfoConnectSensor(SensorEntity):
|
||||
"""Representation of a ComfoConnect sensor."""
|
||||
|
||||
def __init__(self, name, ccb: ComfoConnectBridge, sensor_type) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue