Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
Fixing change of UNIT_PERCENTAGE to PERCENTAGE at HA version 115 - home-assistant/core#40207 - Issue #23 
Fixing typo in TYPE_MAXDAILYGUSTKMH to display as SPEED_KILOMETERS_PER_HOUR - Issue #20
  • Loading branch information
GSzabados authored Sep 21, 2020
1 parent 7243400 commit 935c72c
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions custom_components/ecowitt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
POWER_WATT,
TEMP_CELSIUS,
UNIT_PERCENTAGE,
PERCENTAGE,
PRESSURE_HPA,
PRESSURE_INHG,
LENGTH_INCHES,
Expand Down Expand Up @@ -228,34 +228,34 @@
TYPE_SENSOR, None, "mdi:water", S_METRIC),
TYPE_YEARLYRAINMM: ("Yearly Rain Rate", f"mm/{TIME_YEARS}",
TYPE_SENSOR, None, "mdi:water", S_METRIC),
TYPE_HUMIDITY: ("Humidity", UNIT_PERCENTAGE,
TYPE_HUMIDITY: ("Humidity", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITYIN: ("Indoor Humidity", UNIT_PERCENTAGE,
TYPE_HUMIDITYIN: ("Indoor Humidity", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY1: ("Humidity 1", UNIT_PERCENTAGE,
TYPE_HUMIDITY1: ("Humidity 1", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY2: ("Humidity 2", UNIT_PERCENTAGE,
TYPE_HUMIDITY2: ("Humidity 2", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY3: ("Humidity 3", UNIT_PERCENTAGE,
TYPE_HUMIDITY3: ("Humidity 3", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY4: ("Humidity 4", UNIT_PERCENTAGE,
TYPE_HUMIDITY4: ("Humidity 4", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY5: ("Humidity 5", UNIT_PERCENTAGE,
TYPE_HUMIDITY5: ("Humidity 5", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY6: ("Humidity 6", UNIT_PERCENTAGE,
TYPE_HUMIDITY6: ("Humidity 6", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY7: ("Humidity 7", UNIT_PERCENTAGE,
TYPE_HUMIDITY7: ("Humidity 7", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_HUMIDITY8: ("Humidity 8", UNIT_PERCENTAGE,
TYPE_HUMIDITY8: ("Humidity 8", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_WINDDIR: ("Wind Direction", DEGREE,
Expand All @@ -277,7 +277,7 @@
TYPE_SENSOR, None, "mdi:weather-windy", S_IMPERIAL),
TYPE_MAXDAILYGUST: ("Max Daily Wind Gust", SPEED_MILES_PER_HOUR,
TYPE_SENSOR, None, "mdi:weather-windy", S_IMPERIAL),
TYPE_MAXDAILYGUSTKMH: ("Max Daily Wind Gust", SPEED_MILES_PER_HOUR,
TYPE_MAXDAILYGUSTKMH: ("Max Daily Wind Gust", SPEED_KILOMETERS_PER_HOUR,
TYPE_SENSOR, None, "mdi:weather-windy", S_METRIC),
TYPE_TEMPC: ("Outdoor Temperature", TEMP_CELSIUS,
TYPE_SENSOR, DEVICE_CLASS_TEMPERATURE, "mdi:thermometer", 0),
Expand Down Expand Up @@ -338,28 +338,28 @@
"mdi:weather-sunny", 0),
TYPE_UV: ("UV Index", UV_INDEX,
TYPE_SENSOR, None, "mdi:sunglasses", 0),
TYPE_SOILMOISTURE1: ("Soil Moisture 1", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE1: ("Soil Moisture 1", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_SOILMOISTURE2: ("Soil Moisture 2", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE2: ("Soil Moisture 2", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_SOILMOISTURE3: ("Soil Moisture 3", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE3: ("Soil Moisture 3", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_SOILMOISTURE4: ("Soil Moisture 4", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE4: ("Soil Moisture 4", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_SOILMOISTURE5: ("Soil Moisture 5", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE5: ("Soil Moisture 5", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_SOILMOISTURE6: ("Soil Moisture 6", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE6: ("Soil Moisture 6", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_SOILMOISTURE7: ("Soil Moisture 7", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE7: ("Soil Moisture 7", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_SOILMOISTURE8: ("Soil Moisture 8", UNIT_PERCENTAGE,
TYPE_SOILMOISTURE8: ("Soil Moisture 8", PERCENTAGE,
TYPE_SENSOR, DEVICE_CLASS_HUMIDITY,
"mdi:water-percent", 0),
TYPE_PM25_CH1: ("PM2.5 1", CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
Expand Down

0 comments on commit 935c72c

Please sign in to comment.