Skip to content

Commit

Permalink
Merge pull request #24 from GSzabados/patch-1
Browse files Browse the repository at this point in the history
Update for HA version 115 and fixing typos and adding WH25BATT and WH80BATT
  • Loading branch information
garbled1 authored Nov 11, 2020
2 parents 7243400 + efd3743 commit 508160e
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 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 @@ -149,6 +149,8 @@
TYPE_WH26BATT = "wh26batt"
TYPE_WH65BATT = "wh65batt"
TYPE_WH57BATT = "wh57batt"
TYPE_WH25BATT = "wh25batt"
TYPE_WH80BATT = "wh80batt"
TYPE_SOILBATT1 = "soilbatt1"
TYPE_SOILBATT2 = "soilbatt2"
TYPE_SOILBATT3 = "soilbatt3"
Expand Down Expand Up @@ -228,34 +230,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 +279,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 +340,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 Expand Up @@ -392,6 +394,10 @@
None, "mdi:battery", 0),
TYPE_WH57BATT: ("WH57 Battery", "BATT", TYPE_SENSOR,
None, "mdi:battery", 0),
TYPE_WH25BATT: ("WH25 Battery", "BATT", TYPE_SENSOR,
None, "mdi:battery", 0),
TYPE_WH80BATT: ("WH80 Battery", "BATT", TYPE_SENSOR,
None, "mdi:battery", 0),
TYPE_SOILBATT1: ("Soil Moisture 1 Battery", "BATT", TYPE_SENSOR,
None, "mdi:battery", 0),
TYPE_SOILBATT2: ("Soil Moisture 2 Battery", "BATT", TYPE_SENSOR,
Expand Down Expand Up @@ -456,7 +462,7 @@
'dateutc',
'windgustms',
'windspeedms',
'windspdms_avg10m'
'windspdms_avg10m',
'maxdailygustms',
'windchillf',
'dewpointf',
Expand Down

0 comments on commit 508160e

Please sign in to comment.