Fix DPCode in battery support check for vacuum Tuya (#64806)

This commit is contained in:
dougiteixeira
2022-01-24 06:27:13 -03:00
committed by GitHub
parent a2f3c843f9
commit d33e2609b9

View File

@@ -115,7 +115,7 @@ class TuyaVacuumEntity(TuyaEntity, StateVacuumEntity):
self._supported_features |= SUPPORT_FAN_SPEED self._supported_features |= SUPPORT_FAN_SPEED
self._fan_speed = enum_type self._fan_speed = enum_type
if int_type := self.find_dpcode(DPCode.SUCTION, dptype=DPType.INTEGER): if int_type := self.find_dpcode(DPCode.ELECTRICITY_LEFT, dptype=DPType.INTEGER):
self._supported_features |= SUPPORT_BATTERY self._supported_features |= SUPPORT_BATTERY
self._battery_level = int_type self._battery_level = int_type