Skip to content

Commit

Permalink
Fix attribute ATTR_DISPLAY and ATTR_SOUND
Browse files Browse the repository at this point in the history
  • Loading branch information
claudegel committed Jul 10, 2024
1 parent 2f315a2 commit 50e8736
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions custom_components/neviweb130/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2997,7 +2997,8 @@ def __init__(self, data, device_info, name, sku, firmware):
def update(self):
if self._activ:
HC_ATTRIBUTES = [ATTR_DISPLAY2, ATTR_RSSI, ATTR_COOL_SETPOINT, ATTR_COOL_SETPOINT_MIN, ATTR_COOL_SETPOINT_MAX, ATTR_SYSTEM_MODE, ATTR_CYCLE, ATTR_WATTAGE, ATTR_BACKLIGHT, ATTR_KEYPAD, ATTR_HC_DEV, ATTR_LANGUAGE, ATTR_MODEL,
ATTR_FAN_SPEED, ATTR_FAN_SWING_VERT, ATTR_FAN_SWING_HORIZ, ATTR_FAN_CAP, ATTR_FAN_SWING_CAP, ATTR_FAN_SWING_CAP_HORIZ, ATTR_FAN_SWING_CAP_VERT, ATTR_BALANCE_PT, ATTR_HEAT_LOCK_TEMP, ATTR_COOL_LOCK_TEMP, ATTR_AVAIL_MODE]
ATTR_FAN_SPEED, ATTR_FAN_SWING_VERT, ATTR_FAN_SWING_HORIZ, ATTR_FAN_CAP, ATTR_FAN_SWING_CAP, ATTR_FAN_SWING_CAP_HORIZ, ATTR_FAN_SWING_CAP_VERT, ATTR_BALANCE_PT, ATTR_HEAT_LOCK_TEMP, ATTR_COOL_LOCK_TEMP, ATTR_AVAIL_MODE,
ATTR_DISPLAY_CONF, ATTR_DISPLAY_CAP, ATTR_SOUND_CONF, ATTR_SOUND_CAP]
"""Get the latest data from Neviweb and update the state."""
start = time.time()
_LOGGER.debug("Updated attributes for %s: %s", self._name, UPDATE_ATTRIBUTES + HC_ATTRIBUTES)
Expand Down Expand Up @@ -3053,12 +3054,10 @@ def update(self):
self._heat_lock_temp = device_data[ATTR_HEAT_LOCK_TEMP]
self._cool_lock_temp = device_data[ATTR_COOL_LOCK_TEMP]
self._avail_mode = device_data[ATTR_AVAIL_MODE]
if ATTR_DISPLAY_CAP in device_data:
self._display_cap = device_data[ATTR_DISPLAY_CAP]
self._display_conf = device_data[ATTR_DISPLAY_CONF]
if ATTR_SOUND_CAP in device_data:
self._sound_cap = device_data[ATTR_SOUND_CAP]
self._sound_conf = device_data[ATTR_SOUND_CONF]
self._display_cap = device_data[ATTR_DISPLAY_CAP]
self._display_conf = device_data[ATTR_DISPLAY_CONF]
self._sound_cap = device_data[ATTR_SOUND_CAP]
self._sound_conf = device_data[ATTR_SOUND_CONF]
elif device_data["errorCode"] == "ReadTimeout":
_LOGGER.warning("A timeout occur during data update. Device %s do not respond. Check your network... (%s)", self._name, device_data)
else:
Expand Down

0 comments on commit 50e8736

Please sign in to comment.