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
|
@ -5,10 +5,9 @@ import logging
|
|||
from pyblockchain import get_balance, validate_address
|
||||
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_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -44,7 +43,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
add_entities([BlockchainSensor(name, addresses)], True)
|
||||
|
||||
|
||||
class BlockchainSensor(Entity):
|
||||
class BlockchainSensor(SensorEntity):
|
||||
"""Representation of a Blockchain.com sensor."""
|
||||
|
||||
def __init__(self, name, addresses):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue