Migrate integrations d-e to extend SensorEntity (#48211)
This commit is contained in:
parent
e0cd7072d6
commit
23b562386f
45 changed files with 100 additions and 115 deletions
|
@ -4,7 +4,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_CURRENCY,
|
||||
CONF_MONITORED_VARIABLES,
|
||||
|
@ -13,7 +13,6 @@ from homeassistant.const import (
|
|||
POWER_WATT,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
_RESOURCE = "https://engage.efergy.com/mobile_proxy/"
|
||||
|
@ -94,7 +93,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
add_entities(dev, True)
|
||||
|
||||
|
||||
class EfergySensor(Entity):
|
||||
class EfergySensor(SensorEntity):
|
||||
"""Implementation of an Efergy sensor."""
|
||||
|
||||
def __init__(self, sensor_type, app_token, utc_offset, period, currency, sid=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue