Skip to content

Commit

Permalink
Merge pull request #9 from PoppyPop/2019.9
Browse files Browse the repository at this point in the history
Update sensors for 2021.9.0
  • Loading branch information
PoppyPop authored Aug 29, 2021
2 parents 24bcc0f + 2538a21 commit 5512736
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/ecowitt/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "ecowitt",
"name": "Ecowitt Weather Station",
"version": "0.6",
"version": "0.1.0",
"config_flow": true,
"documentation": "https://github.com/PoppyPop/homeassistant_ecowitt",
"issue_tracker": "hhttps://github.com/PoppyPop/homeassistant_ecowitt/issues",
Expand Down
4 changes: 2 additions & 2 deletions custom_components/ecowitt/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, hass, entry, key, name, dc, uom, icon, sc):
self._sc = sc

@property
def state(self):
def native_value(self):
"""Return the state of the sensor."""
if self._key in self._ws.last_values:
# The lightning time is reported in UTC, hooray.
Expand All @@ -68,7 +68,7 @@ def state(self):
return STATE_UNKNOWN

@property
def unit_of_measurement(self):
def native_unit_of_measurement(self):
"""Return the unit of measurement."""
return self._uom

Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"domains": ["sensor", "binary_sensor"],
"iot_class": "Local Push",
"hacs": "1.6.0",
"homeassistant": "2021.8.0"
"homeassistant": "2021.9.0"
}
4 changes: 4 additions & 0 deletions tests/fake_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
"stationtype": "EasyWeatherV1.4.9",
"dateutc": "2020-11-13+17:10:24",
"tempinc": 20.0,
"tempinf": 68.0,
"humidityin": 40,
"baromrelin": 28.760,
"baromabsin": 28.760,
"tempc": 20.0,
"tempf": 68.0,
"humidity": 64,
"winddir": 319,
"windspeedmph": 0.9,
Expand All @@ -44,10 +46,12 @@
"stationtype": "EasyWeatherV1.5.4",
"dateutc": "2020-11-16+15:30:24",
"tempinc": 20.7,
"tempinf": 69.26,
"humidityin": 52,
"baromrelin": 29.785,
"baromabsin": 29.785,
"tempc": 20.4,
"tempf": 68.72,
"humidity": 94,
"winddir": 260,
"winddir_avg10m": 260,
Expand Down

0 comments on commit 5512736

Please sign in to comment.