Migrate integrations r-s to extend SensorEntity (#48215)
This commit is contained in:
parent
0c086b5067
commit
64bc9a8196
75 changed files with 173 additions and 189 deletions
|
@ -11,10 +11,9 @@ from operator import itemgetter
|
|||
import rjpl
|
||||
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, TIME_MINUTES
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -87,7 +86,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
)
|
||||
|
||||
|
||||
class RejseplanenTransportSensor(Entity):
|
||||
class RejseplanenTransportSensor(SensorEntity):
|
||||
"""Implementation of Rejseplanen transport sensor."""
|
||||
|
||||
def __init__(self, data, stop_id, route, direction, name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue