Adjust Available in hisense_aehw4a1 (#77590)

This commit is contained in:
epenet 2022-08-31 22:22:07 +02:00 committed by GitHub
parent 86c7f0bbac
commit cf41dc639b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ class ClimateAehW4a1(ClimateEntity):
self._fan_modes = FAN_MODES
self._swing_modes = SWING_MODES
self._preset_modes = PRESET_MODES
self._available = None
self._attr_available = False
self._on = None
self._current_temperature = None
self._target_temperature = None
@ -176,10 +176,10 @@ class ClimateAehW4a1(ClimateEntity):
_LOGGER.warning(
"Unexpected error of %s: %s", self._unique_id, library_error
)
self._available = False
self._attr_available = False
return
self._available = True
self._attr_available = True
self._on = status["run_status"]
@ -226,11 +226,6 @@ class ClimateAehW4a1(ClimateEntity):
self._target_temperature = None
self._preset_mode = None
@property
def available(self):
"""Return True if entity is available."""
return self._available
@property
def name(self):
"""Return the name of the climate device."""