Migrate integrations n-q to extend SensorEntity (#48214)
This commit is contained in:
parent
339a56e434
commit
c900e3030b
57 changed files with 129 additions and 136 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Support for OpenUV sensors."""
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.const import TIME_MINUTES, UV_INDEX
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.util.dt import as_local, parse_datetime
|
||||
|
@ -87,7 +88,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
|||
async_add_entities(sensors, True)
|
||||
|
||||
|
||||
class OpenUvSensor(OpenUvEntity):
|
||||
class OpenUvSensor(OpenUvEntity, SensorEntity):
|
||||
"""Define a binary sensor for OpenUV."""
|
||||
|
||||
def __init__(self, openuv, sensor_type, name, icon, unit, entry_id):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue