Use new DeviceClass enums in econet (#61375)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-10 08:57:31 +01:00 committed by GitHub
parent 728f511627
commit f59966f8ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 16 deletions

View file

@ -1,13 +1,8 @@
"""Support for Rheem EcoNet water heaters."""
from pyeconet.equipment import EquipmentType
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import (
DEVICE_CLASS_SIGNAL_STRENGTH,
ENERGY_KILO_WATT_HOUR,
PERCENTAGE,
VOLUME_GALLONS,
)
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
from homeassistant.const import ENERGY_KILO_WATT_HOUR, PERCENTAGE, VOLUME_GALLONS
from . import EcoNetEntity
from .const import DOMAIN, EQUIPMENT
@ -44,7 +39,7 @@ SENSOR_NAMES_TO_UNIT_OF_MEASUREMENT = {
WATER_USAGE_TODAY: VOLUME_GALLONS,
POWER_USAGE_TODAY: None, # Depends on unit type
ALERT_COUNT: None,
WIFI_SIGNAL: DEVICE_CLASS_SIGNAL_STRENGTH,
WIFI_SIGNAL: SensorDeviceClass.SIGNAL_STRENGTH,
RUNNING_STATE: None, # This is just a string
}