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
|
@ -5,10 +5,9 @@ import logging
|
|||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import HTTP_OK
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -90,7 +89,7 @@ class APIData:
|
|||
self.data = parse_api_response(response.json())
|
||||
|
||||
|
||||
class AirSensor(Entity):
|
||||
class AirSensor(SensorEntity):
|
||||
"""Single authority air sensor."""
|
||||
|
||||
ICON = "mdi:cloud-outline"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue