mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Migrate integrations d-e to extend SensorEntity (#48211)
This commit is contained in:
@@ -5,7 +5,7 @@ import logging
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import (
|
||||
CONF_API_KEY,
|
||||
CONF_ID,
|
||||
@@ -19,7 +19,6 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.helpers import template
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -125,7 +124,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
add_entities(sensors)
|
||||
|
||||
|
||||
class EmonCmsSensor(Entity):
|
||||
class EmonCmsSensor(SensorEntity):
|
||||
"""Implementation of an Emoncms sensor."""
|
||||
|
||||
def __init__(
|
||||
|
||||
Reference in New Issue
Block a user