Migrate integrations i-m to extend SensorEntity (#48213)

This commit is contained in:
Erik Montnemery 2021-03-22 19:59:03 +01:00 committed by GitHub
parent 64bc9a8196
commit fdf97eaca3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 152 additions and 157 deletions

View file

@ -1,4 +1,5 @@
"""Support for UK Met Office weather service."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import (
ATTR_ATTRIBUTION,
DEVICE_CLASS_HUMIDITY,
@ -10,7 +11,6 @@ from homeassistant.const import (
UV_INDEX,
)
from homeassistant.core import callback
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
from .const import (
@ -92,7 +92,7 @@ async def async_setup_entry(
)
class MetOfficeCurrentSensor(Entity):
class MetOfficeCurrentSensor(SensorEntity):
"""Implementation of a Met Office current weather condition sensor."""
def __init__(self, entry_data, hass_data, sensor_type):