Migrate integrations i-m to extend SensorEntity (#48213)
This commit is contained in:
parent
64bc9a8196
commit
fdf97eaca3
62 changed files with 152 additions and 157 deletions
|
@ -1,6 +1,7 @@
|
|||
"""Support for Luftdaten sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
ATTR_LATITUDE,
|
||||
|
@ -9,7 +10,6 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import (
|
||||
DATA_LUFTDATEN,
|
||||
|
@ -45,7 +45,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
|||
async_add_entities(sensors, True)
|
||||
|
||||
|
||||
class LuftdatenSensor(Entity):
|
||||
class LuftdatenSensor(SensorEntity):
|
||||
"""Implementation of a Luftdaten sensor."""
|
||||
|
||||
def __init__(self, luftdaten, sensor_type, name, icon, unit, show):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue