From d33e2609b9cd767068241abe651e83401d535392 Mon Sep 17 00:00:00 2001 From: dougiteixeira <31328123+dougiteixeira@users.noreply.github.com> Date: Mon, 24 Jan 2022 06:27:13 -0300 Subject: [PATCH] Fix DPCode in battery support check for vacuum Tuya (#64806) --- homeassistant/components/tuya/vacuum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/tuya/vacuum.py b/homeassistant/components/tuya/vacuum.py index c48761b285d..b67775990bd 100644 --- a/homeassistant/components/tuya/vacuum.py +++ b/homeassistant/components/tuya/vacuum.py @@ -115,7 +115,7 @@ class TuyaVacuumEntity(TuyaEntity, StateVacuumEntity): self._supported_features |= SUPPORT_FAN_SPEED 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._battery_level = int_type