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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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