From 4fdce976e202a2e35b75774aea845a15d7bf857a Mon Sep 17 00:00:00 2001 From: Jason Cheatham Date: Fri, 14 Apr 2023 15:02:44 -0400 Subject: [PATCH] Remove duplicate PRESSURE sensor descriptor --- custom_components/hubitat/sensor.py | 45 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/custom_components/hubitat/sensor.py b/custom_components/hubitat/sensor.py index 4b7a851..a2ed9e2 100644 --- a/custom_components/hubitat/sensor.py +++ b/custom_components/hubitat/sensor.py @@ -656,43 +656,42 @@ def __init__(self, *args: Any, **kwargs: Any): _SENSOR_ATTRS: Tuple[Tuple[str, Type[HubitatSensor]], ...] = ( + (DeviceAttribute.AIR_QUALITY_INDEX, HubitatAirQualityIndexSensor), + (DeviceAttribute.AMPERAGE, HubitatCurrentSensor), + (DeviceAttribute.AQI, HubitatAqiSensor), (DeviceAttribute.BATTERY, HubitatBatterySensor), - (DeviceAttribute.ENERGY, HubitatEnergySensor), - (DeviceAttribute.ENERGY_SOURCE, HubitatEnergySourceSensor), - (DeviceAttribute.HUMIDITY, HubitatHumiditySensor), - (DeviceAttribute.ILLUMINANCE, HubitatIlluminanceSensor), - (DeviceAttribute.POWER, HubitatPowerSensor), - (DeviceAttribute.POWER_SOURCE, HubitatPowerSourceSensor), - (DeviceAttribute.PRESSURE, HubitatPressureSensor), - (DeviceAttribute.TEMPERATURE, HubitatTemperatureSensor), - (DeviceAttribute.VOLTAGE, HubitatVoltageSensor), - (DeviceAttribute.DEW_POINT, HubitatDewPointSensor), (DeviceAttribute.CARBON_DIOXIDE, HubitatCarbonDioxide), (DeviceAttribute.CARBON_DIOXIDE_LEVEL, HubitatCarbonDioxideLevel), (DeviceAttribute.CARBON_MONOXIDE, HubitatCarbonMonoxide), (DeviceAttribute.CARBON_MONOXIDE_LEVEL, HubitatCarbonMonoxideLevel), - (DeviceAttribute.VOC, HubitatVOC), - (DeviceAttribute.VOC_LEVEL, HubitatVOCLevel), - (DeviceAttribute.AMPERAGE, HubitatCurrentSensor), - (DeviceAttribute.DAY_EURO, HubitatWaterDayPriceSensor), - (DeviceAttribute.DAY_LITER, HubitatWaterDayLiterSensor), - (DeviceAttribute.CUMULATIVE_LITER, HubitatWaterCumulativeLiterSensor), (DeviceAttribute.CUMULATIVE_CUBIC_METER, HubitatWaterCumulativeM3Sensor), + (DeviceAttribute.CUMULATIVE_LITER, HubitatWaterCumulativeLiterSensor), (DeviceAttribute.DAY_CUBIC_METER, HubitatWaterDayM3Sensor), - (DeviceAttribute.UV, HubitatUVIndexSensor), - (DeviceAttribute.PRESSURE, HubitatPressureSensor), - (DeviceAttribute.AQI, HubitatAqiSensor), - (DeviceAttribute.AIR_QUALITY_INDEX, HubitatAirQualityIndexSensor), + (DeviceAttribute.DAY_EURO, HubitatWaterDayPriceSensor), + (DeviceAttribute.DAY_LITER, HubitatWaterDayLiterSensor), + (DeviceAttribute.DEW_POINT, HubitatDewPointSensor), + (DeviceAttribute.ENERGY, HubitatEnergySensor), + (DeviceAttribute.ENERGY_SOURCE, HubitatEnergySourceSensor), (DeviceAttribute.HOME_HEALTH, HubitatHomeHealth), + (DeviceAttribute.HUMIDITY, HubitatHumiditySensor), + (DeviceAttribute.ILLUMINANCE, HubitatIlluminanceSensor), (DeviceAttribute.PM1, HubitatPm1Sensor), (DeviceAttribute.PM10, HubitatPm10Sensor), (DeviceAttribute.PM25, HubitatPm25Sensor), - (DeviceAttribute.RAIN_RATE, HubitatRainRateSensor), + (DeviceAttribute.POWER, HubitatPowerSensor), + (DeviceAttribute.POWER_SOURCE, HubitatPowerSourceSensor), + (DeviceAttribute.PRESSURE, HubitatPressureSensor), (DeviceAttribute.RAIN_DAILY, HubitatRainDailySensor), + (DeviceAttribute.RAIN_RATE, HubitatRainRateSensor), + (DeviceAttribute.RATE, HubitatRateSensor), + (DeviceAttribute.TEMPERATURE, HubitatTemperatureSensor), + (DeviceAttribute.UV, HubitatUVIndexSensor), + (DeviceAttribute.VOC, HubitatVOC), + (DeviceAttribute.VOC_LEVEL, HubitatVOCLevel), + (DeviceAttribute.VOLTAGE, HubitatVoltageSensor), (DeviceAttribute.WIND_DIRECTION, HubitatWindDirectionSensor), - (DeviceAttribute.WIND_SPEED, HubitatWindSpeedSensor), (DeviceAttribute.WIND_GUST, HubitatWindGustSensor), - (DeviceAttribute.RATE, HubitatRateSensor), + (DeviceAttribute.WIND_SPEED, HubitatWindSpeedSensor), )