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
|
@ -1,4 +1,5 @@
|
|||
"""Support for AirVisual air quality sensors."""
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.const import (
|
||||
ATTR_LATITUDE,
|
||||
ATTR_LONGITUDE,
|
||||
|
@ -138,7 +139,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
async_add_entities(sensors, True)
|
||||
|
||||
|
||||
class AirVisualGeographySensor(AirVisualEntity):
|
||||
class AirVisualGeographySensor(SensorEntity, AirVisualEntity):
|
||||
"""Define an AirVisual sensor related to geography data via the Cloud API."""
|
||||
|
||||
def __init__(self, coordinator, config_entry, kind, name, icon, unit, locale):
|
||||
|
@ -236,7 +237,7 @@ class AirVisualGeographySensor(AirVisualEntity):
|
|||
self._attrs.pop(ATTR_LONGITUDE, None)
|
||||
|
||||
|
||||
class AirVisualNodeProSensor(AirVisualEntity):
|
||||
class AirVisualNodeProSensor(SensorEntity, AirVisualEntity):
|
||||
"""Define an AirVisual sensor related to a Node/Pro unit."""
|
||||
|
||||
def __init__(self, coordinator, kind, name, device_class, unit):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue