Migrate integrations n-q to extend SensorEntity (#48214)
This commit is contained in:
parent
339a56e434
commit
c900e3030b
57 changed files with 129 additions and 136 deletions
|
@ -3,8 +3,8 @@ import logging
|
|||
|
||||
from numato_gpio import NumatoGpioError
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.const import CONF_ID, CONF_NAME, CONF_SENSORS
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import (
|
||||
CONF_DEVICES,
|
||||
|
@ -58,7 +58,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
add_entities(sensors, True)
|
||||
|
||||
|
||||
class NumatoGpioAdc(Entity):
|
||||
class NumatoGpioAdc(SensorEntity):
|
||||
"""Represents an ADC port of a Numato USB GPIO expander."""
|
||||
|
||||
def __init__(self, name, device_id, port, src_range, dst_range, dst_unit, api):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue