Migrate integrations f-h to extend SensorEntity (#48212)
This commit is contained in:
parent
a49989241a
commit
339a56e434
61 changed files with 154 additions and 167 deletions
|
@ -6,10 +6,9 @@ from fixerio import Fixerio
|
|||
from fixerio.exceptions import FixerioException
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME, CONF_TARGET
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -49,7 +48,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
add_entities([ExchangeRateSensor(data, name, target)], True)
|
||||
|
||||
|
||||
class ExchangeRateSensor(Entity):
|
||||
class ExchangeRateSensor(SensorEntity):
|
||||
"""Representation of a Exchange sensor."""
|
||||
|
||||
def __init__(self, data, name, target):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue