소스 검색

vacuum: Treat null error the same as 0.

Issue #584
Jason Rumney 3 년 전
부모
커밋
c6fac62cfd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      custom_components/tuya_local/vacuum.py

+ 1 - 1
custom_components/tuya_local/vacuum.py

@@ -105,7 +105,7 @@ class TuyaLocalVacuum(TuyaLocalEntity, StateVacuumEntity):
     def state(self):
         """Return the state of the vacuum cleaner."""
         status = self.status
-        if self._error_dps and self._error_dps.get_value(self._device) != 0:
+        if self._error_dps and self._error_dps.get_value(self._device):
             return STATE_ERROR
         elif status in [SERVICE_RETURN_TO_BASE, "returning"]:
             return STATE_RETURNING