Migrate integrations d-e to extend SensorEntity (#48211)
This commit is contained in:
parent
e0cd7072d6
commit
23b562386f
45 changed files with 100 additions and 115 deletions
|
@ -1,7 +1,7 @@
|
|||
"""Support for EnOcean sensors."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import (
|
||||
CONF_DEVICE_CLASS,
|
||||
CONF_ID,
|
||||
|
@ -101,7 +101,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
add_entities([EnOceanWindowHandle(dev_id, dev_name)])
|
||||
|
||||
|
||||
class EnOceanSensor(EnOceanEntity, RestoreEntity):
|
||||
class EnOceanSensor(SensorEntity, EnOceanEntity, RestoreEntity):
|
||||
"""Representation of an EnOcean sensor device such as a power meter."""
|
||||
|
||||
def __init__(self, dev_id, dev_name, sensor_type):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue