Skip to content

Commit

Permalink
Adjust to API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrMachowski authored Jan 5, 2021
1 parent c5990c1 commit 078667e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions custom_components/hydro_imgw/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ def icon(self):
@property
def state(self):
if self._data is not None:
self._state = HydroImgwSensor.extractor(self._data, "status.currentValue")
self._state = HydroImgwSensor.extractor(self._data, "status.currentState.value")
return self._state

@property
def device_state_attributes(self):
attr_paths = {
"current_date": "status.currentDate",
"previous_date": "status.previousDate",
"alarm_value": "status.alarmValue",
"warning_value": "status.warningValue",
"high_value": "status.highValue",
"low_value": "status.lowValue",
"current_date": "status.currentState.date",
"previous_date": "status.previousState.date",
"alarm_value": "alarmValue",
"warning_value": "warningValue",
"high_value": "highValue",
"low_value": "lowValue",
"trend": "trend",
"name": "name",
"state": "state",
Expand Down

0 comments on commit 078667e

Please sign in to comment.