mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-12-17 09:55:51 +00:00
fix: rationale not match fallback strategy #53.
This commit is contained in:
@@ -181,8 +181,14 @@ class MideaEntity(CoordinatorEntity[MideaDataUpdateCoordinator], Entity):
|
||||
try:
|
||||
result = bool(self._rationale.index(status))
|
||||
except ValueError:
|
||||
MideaLogger.error(f"The value of attribute {attribute_key} ('{status}') "
|
||||
if int(status) == 0:
|
||||
result = False
|
||||
else:
|
||||
result = True
|
||||
MideaLogger.info(f"The value of attribute {attribute_key} ('{status}') "
|
||||
f"is not in rationale {self._rationale}")
|
||||
finally:
|
||||
return result
|
||||
return result
|
||||
|
||||
def _set_nested_value(self, attribute_key: str, value: Any) -> None:
|
||||
|
||||
Reference in New Issue
Block a user