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
|
@ -7,7 +7,7 @@ from i2csense.bme280 import BME280 # pylint: disable=import-error
|
|||
import smbus
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import (
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
CONF_NAME,
|
||||
|
@ -15,7 +15,6 @@ from homeassistant.const import (
|
|||
TEMP_FAHRENHEIT,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
from homeassistant.util.temperature import celsius_to_fahrenheit
|
||||
|
||||
|
@ -136,7 +135,7 @@ class BME280Handler:
|
|||
self.sensor.update(first_reading)
|
||||
|
||||
|
||||
class BME280Sensor(Entity):
|
||||
class BME280Sensor(SensorEntity):
|
||||
"""Implementation of the BME280 sensor."""
|
||||
|
||||
def __init__(self, bme280_client, sensor_type, temp_unit, name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue